def METHOD_NAME(self, path: Union[Path, str]) -> Generator[Path, Any, Any]:
    """Iterate over folder with files or a single file and generate file paths.
    Args:
        path: path to a folder or a file
    Raises:
        RuntimeError if the provided `path` doesn't exist
    Yields:
        file paths one by one
    Returns:
        None
    """
    path = Path(path)
    if path.is_file():
        yield path
    elif path.is_dir():
        for item in path.iterdir():
            yield from self.METHOD_NAME(item)
    else:
        raise RuntimeError("Path doesn't exist: {}".format(path))