class_docstr: An object that sends a csv to a given search api.
class_docstr_tok: ["An","object","that","sends","a","csv","to","a","given","search","api","."]
docstr: Check for the csv in the current working directory first, then
  search for it in the package.
  
  Generates id_col, passage
docstr_tok: ["Check","for","the","csv","in","the","current","working","directory","first",",","then","search","for","it","in","the","package",".","Generates","id_col",",","passage"]
code: def csv_generator(self) -> Generator:
      """Check for the csv in the current working directory first, then
      search for it in the package.
  
      Generates id_col, passage
      """
  
      cwd_path = Path().joinpath(self.file).absolute()
      pkg_path = PKG_PATH.joinpath("resources").joinpath(self.file)
  
      if cwd_path.exists():
          path = cwd_path
      elif pkg_path.exists():
          path = pkg_path
      else:
          self.logger.error(
              "Could not find %s or %s", pkg_path, cwd_path
          )
          raise SystemExit
  
      self.logger.info("Estimating completion size...")
      num_lines = count_lines(path)
      with path.open() as file:
          with tqdm(total=num_lines, desc=path.name) as pbar:
              for cid, passage in csv.reader(
                  file, delimiter=self.delim
              ):
                  yield cid, passage
                  pbar.update()
  
file_path: nboost/nboost/indexers/base.py
imports: from abc import abstractmethod
  from typing import Generator
  from nboost.helpers import count_lines
  from nboost.logger import set_logger
  from nboost.indexers import defaults
  from nboost import PKG_PATH
  from pathlib import Path
  from tqdm import tqdm
  import csv
label_desc: Use image node_id 2 for calling the BaseIndexer obj's underlying member method code with example usage: obj.csv_generator() without return types