def _FetchAppEngineSDKSteps(api):
  """Fetches the App Engine SDK and returns its path.

  This uses a downloader script in the infra repo to download a script
  which is then used to download and unpack the SDK itself.
  """
  script_content = api.gitiles.download_file(
      'https://chromium.googlesource.com/infra/infra',
      'bootstrap/get_appengine.py',
      step_name='Fetch SDK downloader',
      # This is a commit after the latest fix to the script,
      # which includes retrying requests.
      branch='fd119c547fd4e56eeab77d138b0426022ae1d159')
  api.python.inline('Run SDK downloader', script_content, args=['--dest=.'])
  return api.path['slave_build'].join('google_appengine')