docs: def _get_equivids(self, limit):
          """
          The file processed here is of the format:
          #NBK_id GR_shortname    OMIM
          NBK1103 trimethylaminuria       136132
          NBK1103 trimethylaminuria       602079
          NBK1104 cdls    122470
          Where each of the rows represents a mapping between
          a gr id and an omim id. These are a 1:many relationship,
          and some of the omim ids are genes(not diseases).
          Therefore, we need to create a loose coupling here.
          We make the assumption that these NBKs are generally higher-level
          grouping classes; therefore the OMIM ids are treated as subclasses.
  
          (This assumption is poor for those omims that are actually genes,
          but we have no way of knowing what those are here...
          we will just have to deal with that for now.)    -- fixed
  
          :param limit:
          :return:
  
          """
          raw = '/'.join((self.rawdir, self.files['idmap']['file']))
          model = Model(self.graph)
          LOG.info('Looping over %s', raw)
          # we look some stuff up in OMIM, so initialize here
          # omim = OMIM(self.graph_type, self.are_bnodes_skized)
          id_map = {}
          allomimids = set()
          col = ['NBK_id', 'GR_shortname', 'OMIM']
  
          with open(raw, 'r', encoding="utf8") as csvfile:
              filereader = csv.reader(csvfile, delimiter='\t', quotechar='\"')
              header = next(filereader)
              header[0] = header[0][1:]
              if header != col:
                  LOG.error(
                      '\nExpected header: %s\nRecieved header: %s', col, header)
                  exit(-1)
  
              for row in filereader:
  
                  nbk_num = row[col.index('NBK_id')]
                  shortname = row[col.index('GR_shortname')]
                  omim_num = row[col.index('OMIM')]
                  gr_id = 'GeneReviews:' + nbk_num
                  omim_id = 'OMIM:' + omim_num
                  if not (
                          (self.test_mode and
                           len(self.test_ids) > 0 and
                           omim_id in self.test_ids) or not
                          self.test_mode):
                      continue
  
                  # sometimes there's bad omim nums
                  omim_num = omim_num.strip()
                  if len(omim_num) > 6:
                      LOG.warning(
                          "OMIM number incorrectly formatted in row %d; skipping:\n%s",
                          filereader.line_num, '\t'.join(row))
                      continue
  
                  # build up a hashmap of the mappings; then process later
                  if nbk_num not in id_map:
                      id_map[nbk_num] = set()
                  id_map[nbk_num].add(omim_num)
  
                  # add the class along with the shortname
                  model.addClassToGraph(gr_id, None)
                  model.addSynonym(gr_id, shortname)
  
                  allomimids.add(omim_num)
  
                  if not self.test_mode and limit is not None \
                          and filereader.line_num > limit:
                      break
  
              # end looping through file
  
          # get the omim ids that are not genes
          # entries_that_are_phenotypes = omim.process_entries(
          #    list(allomimids), filter_keep_phenotype_entry_ids, None, None,
          #    limit=limit, globaltt=self.globaltt)
          #
          # LOG.info(
          #    "Filtered out %d/%d entries that are genes or features",
          #    len(allomimids)-len(entries_that_are_phenotypes), len(allomimids))
          ##########################################################################
  
          # given all_omim_ids from GR,
          # we want to update any which are changed or removed
          # before deciding which are disease / phenotypes
          replaced = allomimids & self.omim_replaced.keys()
          if replaced is not None and len(replaced) > 0:
              LOG.warning("These OMIM ID's are past their pull date: %s", str(replaced))
              for oid in replaced:
                  allomimids.remove(oid)
                  replacements = self.omim_replaced[oid]
                  for rep in replacements:
                      allomimids.update(rep)
          # guard against omim identifiers which have been removed
          obsolete = [
              o for o in self.omim_type
              if self.omim_type[o] == self.globaltt['obsolete']]
          removed = allomimids & set(obsolete)
          if removed is not None and len(removed) > 0:
              LOG.warning("These OMIM ID's are gone: %s", str(removed))
              for oid in removed:
                  allomimids.remove(oid)
          # filter for disease /phenotype types (we can argue about what is included)
          omim_phenotypes = set([
              omim for omim in self.omim_type if self.omim_type[omim] in (
                  self.globaltt['Phenotype'],
                  self.globaltt['has_affected_feature'],  # both a gene and a phenotype
                  self.globaltt['heritable_phenotypic_marker'])])  # probable phenotype
          LOG.info(
              "Have %i omim_ids globally typed as phenotypes from OMIM",
              len(omim_phenotypes))
  
          entries_that_are_phenotypes = allomimids & omim_phenotypes
          LOG.info(
              "Filtered out %d/%d entries that are genes or features",
              len(allomimids - entries_that_are_phenotypes), len(allomimids))
  
          for nbk_num in self.book_ids:
              gr_id = 'GeneReviews:'+nbk_num
              if nbk_num in id_map:
                  omim_ids = id_map.get(nbk_num)
                  for omim_num in omim_ids:
                      omim_id = 'OMIM:'+omim_num
                      # add the gene reviews as a superclass to the omim id,
                      # but only if the omim id is not a gene
                      if omim_id in entries_that_are_phenotypes:
                          model.addClassToGraph(omim_id, None)
                          model.addSubClass(omim_id, gr_id)
              # add this as a generic subclass  -- TEC: this is the job of inference
              model.addSubClass(gr_id, self.globaltt['disease'])
  
          return