code: def testGridSearch(self):
      config = {
          "param1": "ok",
          "param2": [
              "not ok",
              tune.grid_search(["ok", Dummy("not ok")]),
          ],
          "param3": {
              "param4": tune.grid_search([Dummy("ok"), "not ok"]),
          },
      }
  
      replaced = create_resolvers_map()
      config = inject_placeholders(config, replaced)
  
      self.assertEqual(
          config["param2"][1]["grid_search"],
          ["ok", (_RefResolver.TOKEN, "e1eaa08f")],
      )
      self.assertEqual(
          config["param3"]["param4"]["grid_search"],
          [(_RefResolver.TOKEN, "35397f1a"), "not ok"],
      )
  
      # Pretend we picked a choice from the grid searches.
      config["param2"][1] = (_RefResolver.TOKEN, "e1eaa08f")
      config["param3"]["param4"] = "not ok"
  
      resolve_placeholders(config, replaced)
  
      self.assertEqual(config["param2"][1].value, "not 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 2 for calling the PlaceholderTest obj's underlying member method code with example usage: obj.testGridSearch() without return types