code: def testPointsToEvaluateBasicVariantFixedParam(self):
      config = {
          "a": 1,
          "b": tune.randint(0, 3),
      }
  
      from ray.tune.search.basic_variant import BasicVariantGenerator
      from ray.tune.search.variant_generator import logger
  
      # Test whether the initial points of fixed parameters are correctly
      # verified.
      searcher = BasicVariantGenerator(
          points_to_evaluate=[
              {"a": 1, "b": 2},
          ]
      )
      analysis = tune.run(
          _mock_objective,
          name="test",
          config=config,
          search_alg=searcher,
          num_samples=2,
      )
      configs = [trial.config for trial in analysis.trials]
  
      self.assertEqual(searcher.total_samples, 2)
      self.assertEqual(len(configs), searcher.total_samples)
      self.assertEqual([cfg["a"] for cfg in configs], [1] * 2)
      self.assertEqual(configs[0]["b"], 2)
  
      # Test whether correctly throwing warning if the pre-set value of fixed
      # parameters isn't the same as its initial points
      searcher = BasicVariantGenerator(
          points_to_evaluate=[
              {"a": 2, "b": 2},
          ]
      )
  
      with patch.object(logger, "warning") as log_warning_mock:
          tune.run(
              _mock_objective,
              name="test",
              config=config,
              search_alg=searcher,
              num_samples=2,
          )
          log_warning_mock.assert_called_once()
          self.assertEqual(
              log_warning_mock.call_args[0],
              (
                  "Pre-set value `2` is not equal to the value of parameter `a`: 1",
              ),
          )
  
imports: from collections import defaultdict
  from unittest.mock import patch
  import numpy
  import unittest
  import ray
  import ray.tune.search.sample
  from ray import train, tune
  from ray.tune import Experiment
  from ray.tune.search.util import logger
  from ray.tune.search.variant_generator import generate_variants
label_desc: Use image node_id 46 for calling the SearchSpaceTest obj's underlying member method code with example usage: obj.testPointsToEvaluateBasicVariantFixedParam() without return types