code: def __init__(
      self,
      db_path,
      db_type,
      name=None,
      batch_size=100,
      loop_over=False,
      field_names=None,
  ):
      assert db_path is not None, "db_path can't be None."
      assert db_type in C.registered_dbs(), (
          "db_type [{db_type}] is not available. \n"
          "Choose one of these: {registered_dbs}.".format(
              db_type=db_type,
              registered_dbs=C.registered_dbs(),
          )
      )
  
      self.db_path = os.path.expanduser(db_path)
      self.db_type = db_type
      self.name = name or "{db_name}_{default_name_suffix}".format(
          db_name=self._extract_db_name_from_db_path(),
          default_name_suffix=self.default_name_suffix,
      )
      self.batch_size = batch_size
      self.loop_over = loop_over
  
      # Before self._init_reader_schema(...),
      # self.db_path and self.db_type are required to be set.
      super().__init__(self._init_reader_schema(field_names))
      self.ds = Dataset(self._schema, self.name + "_dataset")
      self.ds_reader = None
  
file_path: pytorch/caffe2/python/db_file_reader.py
imports: from caffe2.python import core, scope, workspace, _import_c_extension
  from caffe2.python.dataio import Reader
  from caffe2.python.dataset import Dataset
  from caffe2.python.schema import from_column_list
  import os
label_desc: Use image node_id 1 to create a new DBFileReader object from inherited base classes: Reader with example: obj = DBFileReader(db_path, db_type, name, batch_size, loop_over, field_names)