def METHOD_NAME(gcs_path):
  """Gets the testapp log text generated by game loops."""
  try:
    gcs_contents = _gcs_list_dir(gcs_path)
  except subprocess.CalledProcessError as e:
    logging.error("Unexpected error searching GCS logs:\n%s", e)
    return None
  # The path to the testapp log depends on the platform, device, and scenario
  # being tested. Search for a json file with 'results' in the name to avoid
  # hard-coding too many assumptions about the path. The testapp log should be
  # the only json, but 'results' adds some redundancy in case this changes.
  matching_gcs_logs = [
    line for line in gcs_contents
    if line.endswith(".json") and "results" in line.lower()
  ]
  if not matching_gcs_logs:
    logging.error("Failed to find results log on GCS.")
    return None
  # This assumes testapps only have one scenario. Could change in the future.
  if len(matching_gcs_logs) > 1:
    logging.warning("Multiple scenario logs found.")
  gcs_log = matching_gcs_logs[0]
  try:
    logging.info("Found results log: %s", gcs_log)
    log_text = _gcs_read_file(gcs_log)
    if not log_text:
      logging.warning("Testapp log is empty. App may have crashed.")
    return log_text
  except subprocess.CalledProcessError as e:
    logging.error("Unexpected error reading GCS log:\n%s", e)
    return None