code: def patch_attrs_from_model_to_object(model: nn.Module, instance):
      """
      Patch non nn.Module public attributes of original nn.Module to a new instance.
  
      :param model: a torch.nn.Module
      :param instance: a instance of any object
      """
      for attr in dir(model):
          if (
              attr not in dir(instance)
              and not attr.startswith("_")
              and not isinstance(getattr(model, attr), torch.nn.Module)
          ):
              setattr(instance, attr, getattr(model, attr))
  
label_desc: Use image node_id 1 for calling a global function with example usage: patch_attrs_from_model_to_object(model, instance) without return types