code: def _element_get_id(self, element):
          
          if self._reader._level > 1:
              entry_id = element.get('id')
          else:
              entry_id = element.get('name')
          return entry_id
docs: Get id of reaction or species element.
  
          In old levels the name is used as the id. This method returns the
          correct attribute depending on the level.