docs: def process_entries(
              self, omimids, transform, included_fields=None, graph=None, limit=None,
              globaltt=None
      ):
          """
          Given a list of omim ids,
          this will use the omim API to fetch the entries, according to the
          ```included_fields``` passed as a parameter.
          If a transformation function is supplied,
          this will iterate over each entry,
          and either add the results to the supplied ```graph```
          or will return a set of processed entries that the calling function
          can further iterate.
  
          If no ```included_fields``` are provided, this will simply fetch
          the basic entry from omim,
          which includes an entry's:  prefix, mimNumber, status, and titles.
  
          :param omimids: the set of omim entry ids to fetch using their API
          :param transform: Function to transform each omim entry when looping
          :param included_fields: A set of what fields are required to retrieve
           from the API
          :param graph: the graph to add the transformed data into
          :return:
          """
  
          omimparams = {}
  
          # add the included_fields as parameters
          if included_fields is not None and included_fields:
              omimparams['include'] = ','.join(included_fields)
  
          processed_entries = list()
  
          # scrub any omim prefixes from the omimids before processing
          # cleanomimids = set()
          # for omimid in omimids:
          #    scrubbed = str(omimid).split(':')[-1]
          #    if re.match(r'^\d+$', str(scrubbed)):
          #        cleanomimids.update(scrubbed)
          # omimids = list(cleanomimids)
  
          cleanomimids = [o.split(':')[-1] for o in omimids]
          diff = set(omimids) - set(cleanomimids)
          if diff:
              LOG.warning('OMIM has %i dirty bits see"\n %s', len(diff), str(diff))
              omimids = cleanomimids
          else:
              cleanomimids = list()
  
          acc = 0  # for counting
  
          # note that you can only do request batches of 20
          # see info about "Limits" at http://omim.org/help/api
          # TODO 2017 May seems a majority of many groups of 20
          # are producing python None for RDF triple Objects
  
          groupsize = 20
          if not self.test_mode and limit is not None:
              # just in case the limit is larger than the number of records,
              maxit = limit
              if limit > len(omimids):
                  maxit = len(omimids)
          else:
              maxit = len(omimids)
  
          while acc < maxit:
              end = min((maxit, acc + groupsize))
              # iterate through the omim ids list,
              # and fetch from the OMIM api in batches of 20
  
              if self.test_mode:
                  intersect = list(
                      set([str(i) for i in self.test_ids]) & set(omimids[acc:end]))
                  # some of the test ids are in the omimids
                  if intersect:
                      LOG.info("found test ids: %s", intersect)
                      omimparams.update({'mimNumber': ','.join(intersect)})
                  else:
                      acc += groupsize
                      continue
              else:
                  omimparams.update({'mimNumber': ','.join(omimids[acc:end])})
  
              url = OMIMAPI + urllib.parse.urlencode(omimparams)
  
              try:
                  req = urllib.request.urlopen(url)
              except HTTPError as e:  # URLError?
                  LOG.warning('fetching: %s', url)
                  error_msg = e.read()
                  if re.search(r'The API key: .* is invalid', str(error_msg)):
                      msg = "API Key not valid"
                      raise HTTPError(url, e.code, msg, e.hdrs, e.fp)
                  LOG.error("Failed with: %s", str(error_msg))
                  break
  
              resp = req.read().decode()
              acc += groupsize
  
              myjson = json.loads(resp)
              # snag a copy
              with open('./raw/omim/_' + str(acc) + '.json', 'w') as fp:
                  json.dump(myjson, fp)
  
              entries = myjson['omim']['entryList']
  
              for e in entries:
                  # apply the data transformation, and save it to the graph
                  processed_entry = transform(e, graph, globaltt)
                  if processed_entry is not None:
                      processed_entries.append(processed_entry)
  
                  # ### end iterating over batch of entries
          return processed_entries