code: def extract_single_dist_for_current_platform(self, reqs, dist_key):
      
      distributions = self._resolve_distributions_by_platform(reqs, platforms=['current'])
      try:
        matched_dist = assert_single_element(list(
          dist
          for _, dists in distributions.items()
          for dist in dists
          if dist.key == dist_key
        ))
      except (StopIteration, ValueError) as e:
        raise self.SingleDistExtractionError(
          "Exactly one dist was expected to match name {} in requirements {}: {}"
          .format(dist_key, reqs, e))
      return matched_dist
docs: Resolve a specific distribution from a set of requirements matching the current platform.
  
      :param list reqs: A list of :class:`PythonRequirement` to resolve.
      :param str dist_key: The value of `distribution.key` to match for a `distribution` from the
                           resolved requirements.
      :return: The single :class:`pkg_resources.Distribution` matching `dist_key`.
      :raises: :class:`self.SingleDistExtractionError` if no dists or multiple dists matched the given
               `dist_key`.