code: def testSampleBoundsAx(self):
      from ray.tune.search.ax import AxSearch
      from ax.service.ax_client import AxClient
      from ax.modelbridge.generation_strategy import (
          GenerationStrategy,
          GenerationStep,
      )
      from ax import Models
  
      ignore = [
          "func",
          "randn",
          "qrandn",
          "quniform",
          "qloguniform",
          "qrandint",
          "qrandint_q1",
          "qrandint_q3",
          "qlograndint",
      ]
  
      config = self.config.copy()
      for k in ignore:
          config.pop(k)
  
      # Legacy Ax versions (compatbile with Python 3.6)
      # use `num_arms` instead
      try:
          generation_strategy = GenerationStrategy(
              steps=[GenerationStep(model=Models.UNIFORM, num_arms=-1)]
          )
      except TypeError:
          generation_strategy = GenerationStrategy(
              steps=[
                  GenerationStep(model=Models.UNIFORM, num_trials=-1)
              ]
          )
  
      client1 = AxClient(
          enforce_sequential_optimization=False,
          generation_strategy=generation_strategy,
      )
  
      client1.create_experiment(
          parameters=AxSearch.convert_search_space(config),
          objective_name="a",
          minimize=False,
      )
      searcher1 = AxSearch(ax_client=client1)
  
      def config_generator():
          for i in range(50):
              yield searcher1.suggest(f"trial_{i}")
  
      # Unfortunately even random sampling in Ax takes a long time, so we
      # only sample 50 trials and don't do an extensive bounds check.
      # Full bounds check has been run locally and seems to work fine.
      self._testTuneSampleAPI(
          config_generator(), ignore=ignore, check_stats=False
      )
  
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 17 for calling the SearchSpaceTest obj's underlying member method code with example usage: obj.testSampleBoundsAx() without return types