code: def __init__(self, cardinality):
      super().__init__()
      self.cardinality = cardinality
  
imports: import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new OneHot object from inherited base classes: nn with example: obj = OneHot(cardinality)