code: def testSettingsOverrideBuildkite(self):
      settings = get_default_settings()
  
      with patch(
          "ray_release.buildkite.settings.get_buildkite_prompt_value",
          self.buildkite_mock,
      ):
          # With no buildkite variables, default settings shouldn't be updated
          updated_settings = settings.copy()
          update_settings_from_buildkite(updated_settings)
  
          self.assertDictEqual(settings, updated_settings)
  
          buildkite = self.buildkite.copy()
  
          # Invalid frequency
          self.buildkite.clear()
          self.buildkite.update(buildkite)
          self.buildkite["release-frequency"] = "invalid"
          updated_settings = settings.copy()
          with self.assertRaises(ReleaseTestConfigError):
              update_settings_from_buildkite(updated_settings)
  
          # Invalid priority
          self.buildkite.clear()
          self.buildkite.update(buildkite)
          self.buildkite["release-priority"] = "invalid"
          updated_settings = settings.copy()
          with self.assertRaises(ReleaseTestConfigError):
              update_settings_from_buildkite(updated_settings)
  
          # Invalid test attr regex filters
          self.buildkite.clear()
          self.buildkite.update(buildkite)
          self.buildkite["release-test-attr-regex-filters"] = "xxxx"
          updated_settings = settings.copy()
          with self.assertRaises(ReleaseTestConfigError):
              update_settings_from_buildkite(updated_settings)
  
          self.buildkite.clear()
          self.buildkite.update(buildkite)
          self.buildkite[
              "release-test-attr-regex-filters"
          ] = "name:xxx\ngroup:yyy"
          updated_settings = settings.copy()
          update_settings_from_buildkite(updated_settings)
          self.assertDictEqual(
              updated_settings["test_attr_regex_filters"],
              {
                  "name": "xxx",
                  "group": "yyy",
              },
          )
  
          self.buildkite.clear()
          self.buildkite.update(buildkite)
          self.buildkite["release-frequency"] = "nightly"
          self.buildkite[
              "release-ray-test-repo-branch"
          ] = "user:sub/branch"
          self.buildkite["release-ray-wheels"] = "custom-wheels"
          self.buildkite["release-test-name"] = "name_filter"
          self.buildkite["release-priority"] = "manual"
          updated_settings = settings.copy()
          update_settings_from_buildkite(updated_settings)
  
          self.assertDictEqual(
              updated_settings,
              {
                  "frequency": Frequency.NIGHTLY,
                  "prefer_smoke_tests": False,
                  "test_attr_regex_filters": {"name": "name_filter"},
                  "ray_wheels": "custom-wheels",
                  "ray_test_repo": "https://github.com/user/ray.git",
                  "ray_test_branch": "sub/branch",
                  "priority": Priority.MANUAL,
                  "no_concurrency_limit": False,
              },
          )
  
          self.buildkite["release-frequency"] = "any-smoke"
          update_settings_from_buildkite(updated_settings)
  
          self.assertDictEqual(
              updated_settings,
              {
                  "frequency": Frequency.ANY,
                  "prefer_smoke_tests": True,
                  "test_attr_regex_filters": {"name": "name_filter"},
                  "ray_wheels": "custom-wheels",
                  "ray_test_repo": "https://github.com/user/ray.git",
                  "ray_test_branch": "sub/branch",
                  "priority": Priority.MANUAL,
                  "no_concurrency_limit": False,
              },
          )
  
imports: import os
  import sys
  import tempfile
  import unittest
  from typing import Dict, Callable
  from unittest.mock import patch
  import yaml
  from github import Repository
  from ray_release.buildkite.concurrency import get_test_resources_from_cluster_compute, get_concurrency_group
  from ray_release.buildkite.filter import filter_tests, group_tests
  from ray_release.buildkite.settings import split_ray_repo_str, get_default_settings, update_settings_from_environment, Frequency, update_settings_from_buildkite, Priority, get_test_attr_regex_filters
  from ray_release.buildkite.step import get_step, RELEASE_QUEUE_DEFAULT, RELEASE_QUEUE_CLIENT, DOCKER_PLUGIN_KEY
  from ray_release.test import Test
  from ray_release.exception import ReleaseTestConfigError
  from ray_release.wheels import DEFAULT_BRANCH
label_desc: Use image node_id 5 for calling the BuildkiteSettingsTest obj's underlying member method code with example usage: obj.testSettingsOverrideBuildkite() without return types