code: def update_settings_from_environment(settings: Dict) -> Dict:
      if "RELEASE_FREQUENCY" in os.environ:
          settings["frequency"] = get_frequency(
              os.environ["RELEASE_FREQUENCY"]
          )
  
      if "RELEASE_PREFER_SMOKE_TESTS" in os.environ:
          settings["prefer_smoke_tests"] = bool(
              int(os.environ["RELEASE_PREFER_SMOKE_TESTS"])
          )
      elif os.environ.get("RELEASE_FREQUENCY", "").endswith("-smoke"):
          settings["prefer_smoke_tests"] = True
  
      if "RAY_TEST_REPO" in os.environ:
          settings["ray_test_repo"] = os.environ["RAY_TEST_REPO"]
          settings["ray_test_branch"] = os.environ.get(
              "RAY_TEST_BRANCH", DEFAULT_BRANCH
          )
      elif "BUILDKITE_BRANCH" in os.environ:
          repo_url, branch = get_buildkite_repo_branch()
  
          settings["ray_test_repo"] = repo_url
          settings["ray_test_branch"] = branch
  
      if "RAY_WHEELS" in os.environ:
          settings["ray_wheels"] = os.environ["RAY_WHEELS"]
  
      if "TEST_NAME" in os.environ:
          # This is for backward compatibility.
          settings[
              "test_attr_regex_filters"
          ] = get_test_attr_regex_filters(
              "name:" + os.environ["TEST_NAME"]
          )
  
      if "TEST_ATTR_REGEX_FILTERS" in os.environ:
          settings[
              "test_attr_regex_filters"
          ] = get_test_attr_regex_filters(
              os.environ["TEST_ATTR_REGEX_FILTERS"]
          )
  
      if "RELEASE_PRIORITY" in os.environ:
          settings["priority"] = get_priority(
              os.environ["RELEASE_PRIORITY"]
          )
  
      if "NO_CONCURRENCY_LIMIT" in os.environ:
          settings["no_concurrency_limit"] = bool(
              int(os.environ["NO_CONCURRENCY_LIMIT"])
          )
  
      return settings
  
file_path: ray/release/ray_release/buildkite/settings.py
imports: import enum
  import os
  import subprocess
  from typing import Optional, Dict, Tuple
  from ray_release.exception import ReleaseTestConfigError
  from ray_release.logger import logger
  from ray_release.wheels import DEFAULT_BRANCH, get_buildkite_repo_branch
label_desc: Use image node_id 8 for calling a global function with example usage: update_settings_from_environment(settings) and returns: settings