code: def _theme_dicts_merge(x, y):
      """
      Simple values in `y` override values in `x`.
      If values in `y` and `x` both are dictionaries, then they are merged.
      """
      overlapping_keys = x.keys() & y.keys()
      z = {
          k: {**x[k], **y[k]}
          for k in overlapping_keys
          if type(x[k]) is dict and type(y[k]) is dict
      }
      return {**x, **y, **z}
  
imports: import io
  import json
  import os
  from typing import Union
  from lets_plot._global_settings import get_global_bool, has_global_value, FRAGMENTS_ENABLED
label_desc: Use image node_id 6 for calling a global function with example usage: _theme_dicts_merge(x, y) and returns: dict