code: def _get_placeholder(config: Any, prefix: Tuple, path: Tuple):
      if not path:
          return prefix, config
  
      key = path[0]
      if isinstance(config, tuple):
          if config[0] in (_FunctionResolver.TOKEN, _RefResolver.TOKEN):
              # Found a matching placeholder.
              # Note that we do not require that the full path are consumed before
              # declaring a match. Because this placeholder may be part of a nested
              # search space. For example, the following config:
              #   config = {
              #       "param1": tune.grid_search([
              #           tune.grid_search([Object1, 2, 3]),
              #           tune.grid_search([Object2, 5, 6]),
              #       ]),
              #   }
              # will result in placeholders under path ("param1", 0, 0).
              # After expansion though, the choosen placeholder will live under path
              # ("param1", 0) like this: config = {"param1": (Placeholder1, 2, 3)}
              return prefix, config
          elif key < len(config):
              return _get_placeholder(
                  config[key], prefix=prefix + (path[0],), path=path[1:]
              )
      elif (isinstance(config, dict) and key in config) or (
          isinstance(config, list) and key < len(config)
      ):
          # Expand config tree recursively.
          return _get_placeholder(
              config[key], prefix=prefix + (path[0],), path=path[1:]
          )
  
      # Can not find a matching placeholder.
      return None, None
  
file_path: ray/python/ray/tune/impl/placeholder.py
imports: from collections import defaultdict
  import hashlib
  from typing import Any, Dict, Tuple
  from ray.tune.search.sample import Categorical, Domain, Function
  from ray.tune.search.variant_generator import assign_value
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 5 for calling a global function with example usage: _get_placeholder(config, prefix, path) and returns: None,  None, prefix,  config, prefix,  config, _get_placeholder, _get_placeholder