code: def list_changed_files(commit_range):
      """Returns a list of names of files changed in the given commit range.
  
      The function works by opening a subprocess and running git. If an error
      occurs while running git, the script will abort.
  
      Args:
          commit_range: The commit range to diff, consisting of the two
              commit IDs separated by \"..\"
  
      Returns:
          list: List of changed files within the commit range
      """
      base_branch = os.environ.get("BUILDKITE_PULL_REQUEST_BASE_BRANCH")
      if base_branch:
          pull_command = ["git", "fetch", "origin", base_branch]
          subprocess.check_call(pull_command)
  
      command = ["git", "diff", "--name-only", commit_range, "--"]
      out = subprocess.check_output(command)
      return [
          s.strip() for s in out.decode().splitlines() if s is not None
      ]
  
file_path: ray/ci/pipeline/determine_tests_to_run.py
imports: from __future__ import absolute_import, division, print_function
  import argparse
  import json
  import os
  import re
  import subprocess
  import sys
  from pprint import pformat
  import traceback
label_desc: Use image node_id 1 for calling a global function with example usage: list_changed_files(commit_range) and returns: unknown