class_docstr: Targeted at testing functions of built-in tuners, including
      - [ ] load_checkpoint
      - [ ] save_checkpoint
      - [X] update_search_space
      - [X] generate_multiple_parameters
      - [X] import_data
      - [ ] trial_end
      - [x] receive_trial_result
class_docstr_tok: ["Targeted","at","testing","functions","of","built-in","tuners",",","including","-","[","]","load_checkpoint","-","[","]","save_checkpoint","-","[","X","]","update_search_space","-","[","X","]","generate_multiple_parameters","-","[","X","]","import_data","-","[","]","trial_end","-","[","x","]","receive_trial_result"]
code: def search_space_test_all(
      self,
      tuner_factory,
      supported_types=None,
      ignore_types=None,
      fail_types=None,
  ):
      # Three types: 1. supported; 2. ignore; 3. fail.
      # NOTE(yuge): ignore types
      # Supported types are listed in the table. They are meant to be supported and should be correct.
      # Other than those, all the rest are "unsupported", which are expected to produce ridiculous results
      # or throw some exceptions. However, there are certain types I can't check. For example, generate
      # "normal" using GP Tuner returns successfully and results are fine if we check the range (-inf to +inf),
      # but they make no sense: it's not a normal distribution. So they are ignored in tests for now.
      with open(
          os.path.join(
              os.path.dirname(__file__), "assets/search_space.json"
          ),
          "r",
      ) as fp:
          search_space_all = json.load(fp)
      if supported_types is None:
          supported_types = [
              "choice",
              "randint",
              "uniform",
              "quniform",
              "loguniform",
              "qloguniform",
              "normal",
              "qnormal",
              "lognormal",
              "qlognormal",
          ]
      if fail_types is None:
          fail_types = []
      if ignore_types is None:
          ignore_types = []
      full_supported_search_space = dict()
      for single in search_space_all:
          space = search_space_all[single]
          if any(single.startswith(t) for t in ignore_types):
              continue
          expected_fail = (
              not any(single.startswith(t) for t in supported_types)
              or any(single.startswith(t) for t in fail_types)
              or "fail" in single
          )  # name contains fail (fail on all)
          single_search_space = {single: space}
          if not expected_fail:
              # supports this key
              self.search_space_test_one(
                  tuner_factory, single_search_space
              )
              full_supported_search_space.update(single_search_space)
          else:
              # unsupported key
              with self.assertRaises(
                  Exception, msg="Testing {}".format(single)
              ) as cm:
                  self.search_space_test_one(
                      tuner_factory, single_search_space
                  )
              logger.info(
                  "%s %s %s", tuner_factory, single, cm.exception
              )
      if not any(
          t in self._testMethodName for t in ["batch", "grid_search"]
      ):
          # grid search fails for too many combinations
          logger.info(
              "Full supported search space: %s",
              full_supported_search_space,
          )
          self.search_space_test_one(
              tuner_factory, full_supported_search_space
          )
  
imports: import glob
  import json
  import logging
  import os
  import random
  import shutil
  import sys
  from collections import deque
  from unittest import TestCase, main
  from nni.algorithms.hpo.batch_tuner import BatchTuner
  from nni.algorithms.hpo.dngo_tuner import DNGOTuner
  from nni.algorithms.hpo.evolution_tuner import EvolutionTuner
  from nni.algorithms.hpo.gp_tuner import GPTuner
  from nni.algorithms.hpo.gridsearch_tuner import GridSearchTuner
  from nni.algorithms.hpo.hyperopt_tuner import HyperoptTuner
  from nni.algorithms.hpo.metis_tuner import MetisTuner
  from nni.algorithms.hpo.pbt_tuner import PBTTuner
  from nni.algorithms.hpo.random_tuner import RandomTuner
  from nni.algorithms.hpo.regularized_evolution_tuner import RegularizedEvolutionTuner
  from nni.algorithms.hpo.tpe_tuner import TpeTuner
  from nni.runtime.msg_dispatcher import _pack_parameter, MsgDispatcher
  from nni.tuner import Tuner
label_desc: Use image node_id 7 for calling the BuiltinTunersTestCase obj's underlying member method code with example usage: obj.search_space_test_all(tuner_factory, supported_types, ignore_types, fail_types) without return types