code: def merge_config(config):
      """
      Merge config into global config.
      Args:
          config (dict): Config to be merged.
      Returns: global config
      """
      for key, value in config.items():
          if "." not in key:
              if isinstance(value, dict) and key in global_config:
                  global_config[key].update(value)
              else:
                  global_config[key] = value
          else:
              sub_keys = key.split(".")
              assert (
                  sub_keys[0] in global_config
              ), "the sub_keys can only be one of global_config: {}, but get: {}, please check your running command".format(
                  global_config.keys(), sub_keys[0]
              )
              cur = global_config[sub_keys[0]]
              for idx, sub_key in enumerate(sub_keys[1:]):
                  if idx == len(sub_keys) - 2:
                      cur[sub_key] = value
                  else:
                      cur = cur[sub_key]
  
file_path: PaddleOCR/configs/rec/multi_language/generate_multi_language_configs.py
imports: import yaml
  from argparse import ArgumentParser, RawDescriptionHelpFormatter
  import os.path
  import logging
label_desc: Use image node_id 1 for calling a global function with example usage: merge_config(config) without return types