code: def testSetSearchPropertiesBackwardsCompatibility(
      self, mocked_warning_method
  ):
      from ray.tune.search import Searcher
  
      class MySearcher(Searcher):
          def __init__(self, metric="a", mode="min", **kwargs):
              super(MySearcher, self).__init__(
                  metric=metric, mode=mode, **kwargs
              )
  
          def suggest(self, trial_id):
              return {}
  
          def on_trial_complete(self, trial_id, result, **kwargs):
              pass
  
          # impl that has not been updated yet.
          def set_search_properties(self, metric, mode, config):
              pass
  
      tune.run(
          _mock_objective, config={"a": 1}, search_alg=MySearcher()
      )
      mocked_warning_method.assert_called_once_with(
          "Please update custom Searcher to take in function signature "
          "as ``def set_search_properties(metric, mode, config, "
          "**spec) -> bool``."
      )
  
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 49 for calling the SearchSpaceTest obj's underlying member method code with example usage: obj.testSetSearchPropertiesBackwardsCompatibility(mocked_warning_method) and returns: dict