code: def deep_restricted_update(default_vals, new_vals, iter_attrs=None):
      """Return an updated dictionary that mirrors `default_vals`, except where the key in `new_vals`
      matches the path in `default_vals`, in which case the `new_vals` value is used
  
      Parameters
      ----------
      default_vals: Dict
          Dict containing the values to return if an alternative is not found in `new_vals`
      new_vals: Dict
          Dict whose keys are expected to be tuples corresponding to key paths in `default_vals`
      iter_attrs: Callable, list of callables, or None, default=None
          If callable, must evaluate to True or False when given three inputs: (path, key, value).
          Callable should return True if the current value should be entered by `remap`. If callable
          returns False, `default_enter` will be called. If `iter_attrs` is a list of callables, the
          value will be entered if any evaluates to True. If None, `default_enter` will be called
  
      Returns
      -------
      Dict, or None
  
      Examples
      --------
      >>> deep_restricted_update({'a': 1, 'b': 2}, {('b',): 'foo', ('c',): 'bar'})
      {'a': 1, 'b': 'foo'}
      >>> deep_restricted_update({'a': 1, 'b': {'b1': 2, 'b2': 3}}, {('b', 'b1'): 'foo', ('c', 'c1'): 'bar'})
      {'a': 1, 'b': {'b1': 'foo', 'b2': 3}}"""
      if not default_vals:
          return default_vals
  
      def _visit(path, key, value):
          """If (`path` + `key`) is a key in `new_vals`, return its value. Else, default return"""
          for _current_key, _current_val in new_vals.items():
              if path + (key,) == _current_key:
                  return (key, _current_val)
          return (key, value)
  
      return remap(
          default_vals,
          visit=_visit,
          enter=extra_enter_attrs(iter_attrs),
      )
  
imports: from hyperparameter_hunter.utils.boltons_utils import remap, default_enter
  from datetime import datetime
  from inspect import Traceback
  import re
  import string
  from typing import Any, Callable, Iterable, List, Tuple, Union
  import wrapt
label_desc: Use image node_id 1 for calling a global function with example usage: deep_restricted_update(default_vals, new_vals, iter_attrs) and returns: remap, default_vals, key,  value, key,  _current_val