class_docstr: Build a SQLite database from folder with txt files, json files or
  `Wiki Extractor <https://github.com/attardi/wikiextractor>`_ files.
class_docstr_tok: ["Build","a","SQLite","database","from","folder","with","txt","files",",","json","files","or","`","Wiki","Extractor","<","https",":","\/\/github.com\/attardi\/wikiextractor",">","`","_","files","."]
docstr: 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
docstr_tok: ["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","`","does","n't","exist","Yields",":","file","paths","one","by","one","Returns",":","None"]
code: 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))
  
imports: import json
  import logging
  import sqlite3
  import unicodedata
  from multiprocessing import Pool
  from pathlib import Path
  from typing import Union, List, Tuple, Generator, Any, Optional
  from tqdm import tqdm
  from deeppavlov.core.commands.utils import expand_path
  from deeppavlov.core.common.errors import ConfigError
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.data.dataset_reader import DatasetReader
  from deeppavlov.core.data.utils import download
label_desc: Use image node_id 2 for calling the ODQADataReader obj's underlying member method code with example usage: obj.iter_files(path) without return types