code: def resolve_placeholders(config: Any, replaced: defaultdict):
      """Replaces placeholders contained by a config dict with the original values.
  
      Args:
          config: The config to replace placeholders in.
          replaced: A dict from path to replaced objects.
      """
  
      def __resolve(resolver_type, args):
          for path, resolvers in replaced.items():
              assert resolvers
  
              if not isinstance(resolvers[0], resolver_type):
                  continue
  
              prefix, ph = _get_placeholder(config, (), path)
              if not ph:
                  # Represents an unchosen value. Just skip.
                  continue
  
              for resolver in resolvers:
                  if resolver.hash != ph[1]:
                      continue
                  # Found the matching resolver.
                  assign_value(config, prefix, resolver.resolve(*args))
  
      # RefResolvers first.
      __resolve(_RefResolver, args=())
      # Functions need to be resolved after RefResolvers, in case they are
      # referencing values from the RefResolvers.
      __resolve(_FunctionResolver, args=(config,))
  
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 6 for calling a global function with example usage: resolve_placeholders(config, replaced) without return types