code: def get_version_from_dirname(name, parent):
      
      parent = parent.resolve()
  
      re_dirname = re.compile(f"{name}-{RE_VERSION}$")
      if not re_dirname.match(parent.name):
          return None
  
      return Version.parse(parent.name[len(name) + 1 :])
docs: Extracted sdist