docstr: Restore a reader schema from the DB file.
  
  If `field_names` given, restore scheme according to it.
  
  Overwise, loade blobs from the DB file into the workspace,
  and restore schema from these blob names.
  It is also assumed that:
  1). Each field of the schema have corresponding blobs
      stored in the DB file.
  2). Each blob loaded from the DB file corresponds to
      a field of the schema.
  3). field_names in the original schema are in alphabetic order,
      since blob names loaded to the workspace from the DB file
      will be in alphabetic order.
  
  Load a set of blobs from a DB file. From names of these blobs,
  restore the DB file schema using `from_column_list(...)`.
  
  Returns:
      schema: schema.Struct. Used in Reader.__init__(...).
docstr_tok: ["Restore","a","reader","schema","from","the","DB","file",".","If","`","field_names","`","given",",","restore","scheme","according","to","it",".","Overwise",",","loade","blobs","from","the","DB","file","into","the","workspace",",","and","restore","schema","from","these","blob","names",".","It","is","also","assumed","that",":","1",")",".","Each","field","of","the","schema","have","corresponding","blobs","stored","in","the","DB","file",".","2",")",".","Each","blob","loaded","from","the","DB","file","corresponds","to","a","field","of","the","schema",".","3",")",".","field_names","in","the","original","schema","are","in","alphabetic","order",",","since","blob","names","loaded","to","the","workspace","from","the","DB","file","will","be","in","alphabetic","order",".","Load","a","set","of","blobs","from","a","DB","file",".","From","names","of","these","blobs",",","restore","the","DB","file","schema","using","`","from_column_list","(","...",")","`",".","Returns",":","schema",":","schema.Struct",".","Used","in","Reader.__init__","(","...",")","."]
code: def _init_reader_schema(self, field_names=None):
      """Restore a reader schema from the DB file.
  
      If `field_names` given, restore scheme according to it.
  
      Overwise, loade blobs from the DB file into the workspace,
      and restore schema from these blob names.
      It is also assumed that:
      1). Each field of the schema have corresponding blobs
          stored in the DB file.
      2). Each blob loaded from the DB file corresponds to
          a field of the schema.
      3). field_names in the original schema are in alphabetic order,
          since blob names loaded to the workspace from the DB file
          will be in alphabetic order.
  
      Load a set of blobs from a DB file. From names of these blobs,
      restore the DB file schema using `from_column_list(...)`.
  
      Returns:
          schema: schema.Struct. Used in Reader.__init__(...).
      """
      if field_names:
          return from_column_list(field_names)
  
      if self.db_type == "log_file_db":
          assert os.path.exists(
              self.db_path
          ), "db_path [{db_path}] does not exist".format(
              db_path=self.db_path
          )
      with core.NameScope(self.name):
          # blob_prefix is for avoiding name conflict in workspace
          blob_prefix = scope.CurrentNameScope()
      workspace.RunOperatorOnce(
          core.CreateOperator(
              "Load",
              [],
              [],
              absolute_path=True,
              db=self.db_path,
              db_type=self.db_type,
              load_all=True,
              add_prefix=blob_prefix,
          )
      )
      col_names = [
          blob_name[len(blob_prefix) :]
          for blob_name in sorted(workspace.Blobs())
          if blob_name.startswith(blob_prefix)
      ]
      schema = from_column_list(col_names)
      return schema
  
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 3 for calling the DBFileReader obj's underlying member method code with example usage: obj._init_reader_schema(field_names) and returns: schema, from_column_list