code: def get_commit_range():
      commit_range = None
  
      if os.environ.get("TRAVIS"):
          commit_range = os.environ["TRAVIS_COMMIT_RANGE"]
      elif os.environ.get("GITHUB_EVENT_PATH"):
          with open(os.environ["GITHUB_EVENT_PATH"], "rb") as f:
              event = json.loads(f.read())
          base = event["pull_request"]["base"]["sha"]
          commit_range = "{}...{}".format(base, event.get("after", ""))
      elif os.environ.get("BUILDKITE"):
          commit_range = "origin/{}...{}".format(
              os.environ["BUILDKITE_PULL_REQUEST_BASE_BRANCH"],
              os.environ["BUILDKITE_COMMIT"],
          )
  
      assert commit_range is not None
      return commit_range
  
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 3 for calling a global function with example usage: get_commit_range() and returns: commit_range