code: def get_hash(self, ireq, ireq_hashes=None):
          
  
          # We _ALWAYS MUST PRIORITIZE_ the inclusion of hashes from local sources
          # PLEASE *DO NOT MODIFY THIS* TO CHECK WHETHER AN IREQ ALREADY HAS A HASH
          # RESOLVED. The resolver will pull hashes from PyPI and only from PyPI.
          # The entire purpose of this approach is to include missing hashes.
          # This fixes a race condition in resolution for missing dependency caches
          # see pypa/pipenv#3289
          if not self._should_include_hash(ireq):
              return set()
          elif self._should_include_hash(ireq) and (
              not ireq_hashes or ireq.link.scheme == "file"
          ):
              if not ireq_hashes:
                  ireq_hashes = set()
              new_hashes = self.resolver.repository._hash_cache.get_hash(ireq.link)
              ireq_hashes = add_to_set(ireq_hashes, new_hashes)
          else:
              ireq_hashes = set(ireq_hashes)
          # The _ONLY CASE_ where we flat out set the value is if it isn't present
          # It's a set, so otherwise we *always* need to do a union update
          if ireq not in self.hashes:
              return ireq_hashes
          else:
              return self.hashes[ireq] | ireq_hashes
docs: Retrieve hashes for a specific ``InstallRequirement`` instance.
  
          :param ireq: An ``InstallRequirement`` to retrieve hashes for
          :type ireq: :class:`~pip_shims.InstallRequirement`
          :return: A set of hashes.
          :rtype: Set