def iter_files(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.iter_files(item)
        else:
            raise RuntimeError("Path doesn't exist: {}".format(path))
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

        
deeppavlov/dataset_readers/odqa_reader.py