code: def _do_update_dataclass(
      obj: Any,
      overrides: MutableMapping[str, Any],
      leftovers: List[str],
      path: List[str],
  ) -> None:
      for name, value in obj.__dict__.items():
          try:
              override = overrides.pop(name)
          except KeyError:
              continue
  
          # Recursively traverse child dataclasses.
          if override is not None and is_dataclass(value):
              if not isinstance(override, MutableMapping):
                  p = ".".join(path + [name])
  
                  raise TypeError(
                      f"The key '{p}' must be of a mapping type (e.g. `dict`), but is of type `{type(override)}` instead."
                  )
  
              path.append(name)
  
              _do_update_dataclass(value, override, leftovers, path)
  
              path.pop()
          else:
              setattr(obj, name, override)
  
      if overrides:
          leftovers += [".".join(path + [name]) for name in overrides]
  
label_desc: Use image node_id 2 for calling a global function with example usage: _do_update_dataclass(obj, overrides, leftovers, path) without return types