code: def g(self, id):
          
          if id not in self._m:
              if self.orig_ids:
                  self._m[id] = id
                  if self.warn:
                      try:
                          int(id)
                      except:
                          sys.stderr.write(
                              'Warning: ID "%s" is not an integer.\n' % id)
                          self.warn = False
              else:
                  self._m[id] = self.index
                  self.index += 1
          return self._m[id]
docs: If the given id is known, the numerical representation is returned,
          otherwise a new running number is assigned to the id and returned