docs: def get_version_from_unpacked_sdist(path):
      """Assume path points to unpacked source distribution and get version."""
      # This is a condensed version of the relevant code in pkginfo 1.4.1
      try:
          with open(os.path.join(path, 'PKG-INFO')) as f:
              data = f.read()
      except IOError:
          # Could not load path as an unpacked sdist as it had no PKG-INFO file
          return
      fp = StringIO(_must_decode(data))
      msg = Parser().parse(fp)
      value = msg.get('Version')
      if value != 'UNKNOWN':
          return value