code: def update_nested_dict(main_dict, new_dict):
      """
      Update nested dict (only level of nesting) with new values.
  
      Unlike `dict.update`, this assumes that the values of the parent dict are
      dicts (or dict-like), so you shouldn't replace the nested dict if it
      already exists. Instead you should update the sub-dict.
      """
      # update named styles specified by user
      for name, rc_dict in new_dict.items():
          main_dict.setdefault(name, {}).update(rc_dict)
      return main_dict
  
file_path: catboost/contrib/python/matplotlib/py3/matplotlib/style/core.py
imports: import contextlib
  import logging
  import os
  from pathlib import Path
  import sys
  import warnings
  import matplotlib
  from matplotlib import _api, _docstring, _rc_params_in_file, rcParamsDefault
label_desc: Use image node_id 5 for calling a global function with example usage: update_nested_dict(main_dict, new_dict) and returns: main_dict