code: def __init__(self, net: nn.Module):
      super().__init__()
      self.net = net
      self.cpu_state: torch.Tensor = torch.get_rng_state()
      self.cuda_in_fwd: bool = False
      self.gpu_devices: List[int] = []
      self.gpu_states: List[torch.Tensor] = []
      self.wrap_inputs = isinstance(net, RequiresWrappedInputs)
  
imports: from typing import List
  import torch
  import torch.nn
  from torch.autograd.function import Function
  from torch.utils.checkpoint import get_device_states, set_device_states
  from xformers.components import RequiresWrappedInputs
label_desc: Use image node_id 1 to create a new Deterministic object from inherited base classes: nn with example: obj = Deterministic(net)