code: def testCategorical(self):
      config = {
          "param1": "ok",
          "param2": ["not ok", tune.choice([Dummy("ok"), "not ok"])],
          "param3": {
              "param4": tune.choice([Dummy("ok"), "not ok"]),
          },
      }
  
      replaced = create_resolvers_map()
      config = inject_placeholders(config, replaced)
  
      self.assertEqual(
          config["param2"][1].categories,
          [(_RefResolver.TOKEN, "e6a5a3d5"), "not ok"],
      )
      self.assertEqual(
          config["param3"]["param4"].categories,
          [(_RefResolver.TOKEN, "35397f1a"), "not ok"],
      )
  
      # Pretend we picked a choice from the categoricals.
      config["param2"][1] = (_RefResolver.TOKEN, "e6a5a3d5")
      config["param3"]["param4"] = "not ok"
  
      resolve_placeholders(config, replaced)
  
      self.assertEqual(config["param2"][1].value, "ok")
      self.assertEqual(config["param3"]["param4"], "not ok")
  
imports: import numpy
  import unittest
  from ray import tune
  from ray.tune.impl.placeholder import inject_placeholders, resolve_placeholders, create_resolvers_map, _FunctionResolver, _RefResolver
  from ray.tune.search.sample import Float, Integer
label_desc: Use image node_id 3 for calling the PlaceholderTest obj's underlying member method code with example usage: obj.testCategorical() without return types