nodes: 0, module; 1, function_definition; 2, function_name:get_gae_versions; 3, parameters; 4, block; 5, expression_statement; 6, expression_statement; 7, expression_statement; 8, expression_statement; 9, comment:# We only care about the Python releases, which all are in the format; 10, comment:# "featured/google_appengine_{version}.zip". We'll extract the version; 11, comment:# number so we can sort the list by version, and finally get the download; 12, comment:# URL.; 13, expression_statement; 14, for_statement; 15, return_statement; 16, comment:"""Gets a list of all of the available Python SDK versions, sorted with
      the newest last."""; 17, assignment; 18, call; 19, assignment; 20, assignment; 21, identifier:release; 22, identifier:releases; 23, block; 24, call; 25, identifier:r; 26, call; 27, attribute; 28, argument_list; 29, identifier:releases; 30, call; 31, identifier:versions_and_urls; 32, list; 33, expression_statement; 34, if_statement; 35, expression_statement; 36, identifier:sorted; 37, argument_list; 38, attribute; 39, argument_list; 40, identifier:r; 41, identifier:raise_for_status; 42, attribute; 43, argument_list; 44, assignment; 45, not_operator; 46, block; 47, call; 48, identifier:versions_and_urls; 49, keyword_argument; 50, identifier:requests; 51, identifier:get; 52, identifier:SDK_RELEASES_URL; 53, call; 54, identifier:get; 55, string; 56, dictionary; 57, identifier:match; 58, call; 59, identifier:match; 60, continue_statement; 61, attribute; 62, argument_list; 63, identifier:key; 64, lambda; 65, attribute; 66, argument_list; 67, string_content:items; 68, attribute; 69, argument_list; 70, identifier:versions_and_urls; 71, identifier:append; 72, tuple; 73, lambda_parameters; 74, subscript; 75, identifier:r; 76, identifier:json; 77, identifier:PYTHON_RELEASE_RE; 78, identifier:match; 79, subscript; 80, list_comprehension; 81, subscript; 82, identifier:x; 83, identifier:x; 84, integer:0; 85, identifier:release; 86, string; 87, call; 88, for_in_clause; 89, identifier:release; 90, string; 91, string_content:name; 92, identifier:int; 93, argument_list; 94, identifier:x; 95, call; 96, string_content:mediaLink; 97, identifier:x; 98, attribute; 99, argument_list; 100, identifier:match; 101, identifier:groups
code: def get_gae_versions():
      """Gets a list of all of the available Python SDK versions, sorted with
      the newest last."""
      r = requests.get(SDK_RELEASES_URL)
      r.raise_for_status()
  
      releases = r.json().get('items', {})
  
      # We only care about the Python releases, which all are in the format
      # "featured/google_appengine_{version}.zip". We'll extract the version
      # number so we can sort the list by version, and finally get the download
      # URL.
      versions_and_urls = []
      for release in releases:
          match = PYTHON_RELEASE_RE.match(release['name'])
  
          if not match:
              continue
  
          versions_and_urls.append(
              ([int(x) for x in match.groups()], release['mediaLink']))
  
      return sorted(versions_and_urls, key=lambda x: x[0])