code: def extract_version_from_filename(filename):
      
      filename = os.path.splitext(os.path.basename(filename))[0]
      if filename.endswith('.tar'):
          filename = os.path.splitext(filename)[0]
      return filename.partition('-')[2]
docs: Extract version number from sdist filename.