code: def _merge(d1, d2):
      """Like update, but merges sub-dicts instead of clobbering at the top level.
  
      Updates d1 in-place
      """
  
      if not isinstance(d2, dict) or not isinstance(d1, dict):
          return d2
      for key, value in d2.items():
          d1[key] = _merge(d1.get(key), value)
      return d1
  
file_path: catboost/contrib/python/ipython/py3/IPython/core/display_functions.py
imports: from binascii import b2a_hex
  import os
  import sys
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: _merge(d1, d2) and returns: d1, d2