code: def testFunction(self):
      config = {
          "param1": "ok",
          "param2": ["not ok", tune.sample_from(lambda: "not ok")],
          # Both lambdas, either taking spec or config, should work.
          "param3": {
              "param4": tune.sample_from(
                  lambda spec: spec["config"]["param1"]
              ),
          },
          "param4": {
              "param4": tune.sample_from(
                  lambda config: config["param1"]
              ),
          },
          # Make sure dot notation also works with spec passed in.
          "param5": {
              "param4": tune.sample_from(
                  lambda spec: spec.config["param1"]
              ),
          },
      }
  
      replaced = create_resolvers_map()
      config = inject_placeholders(config, replaced)
  
      self.assertEqual(config["param2"][1][0], _FunctionResolver.TOKEN)
      self.assertEqual(
          config["param3"]["param4"][0], _FunctionResolver.TOKEN
      )
      self.assertEqual(
          config["param4"]["param4"][0], _FunctionResolver.TOKEN
      )
      self.assertEqual(
          config["param5"]["param4"][0], _FunctionResolver.TOKEN
      )
  
      resolve_placeholders(config, replaced)
  
      self.assertEqual(config["param2"][1], "not ok")
      self.assertEqual(config["param3"]["param4"], "ok")
      self.assertEqual(config["param4"]["param4"], "ok")
      self.assertEqual(config["param5"]["param4"], "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 7 for calling the PlaceholderTest obj's underlying member method code with example usage: obj.testFunction() without return types