code: def _update_patched_params(
      fmodule: _MonkeyPatchBase,
      params_box: _typing.Sequence[_typing.List[_torch.Tensor]],
      params_offset: int,
  ) -> int:
      num_params = len(
          [1 for p in fmodule._parameters.values() if p is not None]
      )
      child_params_offset = params_offset + num_params
      for name, child in fmodule._modules.items():
          child_params_offset = _update_patched_params(
              child, params_box, child_params_offset
          )
  
      with _modify_internally(fmodule):
          for name, param in zip(
              fmodule._param_names,
              params_box[0][params_offset : params_offset + num_params],
          ):
              setattr(fmodule, name, param)
      return child_params_offset
  
imports: import abc
  from collections import OrderedDict
  from contextlib import contextmanager
  import typing
  import weakref
  import warnings
  import torch
  from .None import utils
label_desc: Use image node_id 5 for calling a global function with example usage: _update_patched_params(fmodule, params_box, params_offset) and returns: child_params_offset