def _IsLegacy(discovery_rest_url):
  """Returns whether the given discovery URL uses legacy discovery.

  Args:
    discovery_rest_url: a str containing a discovery URL for an API.

  Returns:
    True if the discovery URL is determined to be a legacy, otherwise False.
  """
  if 'googleapis.com/$discovery' in discovery_rest_url:
    return False
  return True