code: def _merge_dict(a, b, path=None):
      "merges b into a"
      if path is None:
          path = []
      for key in b:
          if key in a:
              if isinstance(a[key], dict) and isinstance(b[key], dict):
                  _merge_dict(a[key], b[key], path + [str(key)])
              else:
                  raise Exception(
                      "Conflict at %s" % ".".join(path + [str(key)])
                  )
          else:
              a[key] = b[key]
      return a
  
file_path: fastNLP/fastNLP/core/collators/packer_unpacker.py
imports: from collections import defaultdict
  from functools import reduce
  from typing import Sequence, Mapping, Dict
label_desc: Use image node_id 3 for calling a global function with example usage: _merge_dict(a, b, path) and returns: a