code: def key_from_ireq(ireq):
      
      if ireq.req is None and ireq.link is not None:
          return str(ireq.link)
      else:
          return key_from_req(ireq.req)
docs: Get a standardized key for an InstallRequirement.