def _filter_and_sort_files(files: Iterator[PathLikeObj]) -> Iterator[PathLikeObj]:
    """Sort files by name, and filter out non-YAML files and Python files.

    :param files: A list of files and/or directories to be filtered and sorted.

    :yields: filtered and sorted objects.
    """
    for file in sorted(files, key=lambda x: x.name):
        if file.name.lower().endswith((".yml", ".yaml")) or file.is_dir():
            yield file
        elif not file.name.lower().endswith((".py", ".pyc")):
            logger.info("Ignored a non-YAML file found under `%s` directory: `%s`.", __name__.split('.')[-1], file)
Sort files by name, and filter out non-YAML files and Python files.

    :param files: A list of files and/or directories to be filtered and sorted.

    :yields: filtered and sorted objects.
    
patroni/postgresql/available_parameters/__init__.py