code: def get_conditional_config(config):
      r"""Extract the config entries that do not have ``parent_config`` key."""
      deeper_config = CfgNode(
          new_allowed=True
      )  # parent key to child node
      configkeys = list(config.keys())
      for key in configkeys:
          if config[key] is not None and "parent_config" in config[key]:
              deeper_config[key] = config[key]
              config.pop(key)
  
      # breadth first search over all config nodes
      queue = [config]
  
      while len(queue) > 0:
          v = queue.pop(0)
          ordv = OrderedDict(v.copy())
          while len(ordv) > 0:
              leaf = ordv.popitem()
              if (
                  isinstance(leaf[1], str)
                  and leaf[1] in deeper_config.keys()
              ):
                  retrieved = deeper_config[leaf[1]]
                  setattr(config, leaf[1], retrieved)
                  if isinstance(retrieved, CfgNode):
                      # also BFS the newly added CfgNode.
                      queue.append(retrieved)
              elif isinstance(leaf[1], CfgNode):
                  queue.append(leaf[1])
      return config
  
file_path: OpenPrompt/openprompt/config.py
imports: import argparse
  from yacs.config import CfgNode
  import sys
  from openprompt.utils.utils import check_config_conflicts
  from .default_config import get_default_config
  from openprompt.utils.logging import logger
  import os
label_desc: Use image node_id 3 for calling a global function with example usage: get_conditional_config(config) and returns: config