code: def __init__(self, net, ignore_index=-100, pad_value=0):
      super().__init__()
      assert isinstance(
          net, ReformerLM
      ), "generative trainer wrapper can only accept ReformerLM class"
      self.pad_value = pad_value
      self.ignore_index = ignore_index
  
      self.net = Autopadder(net)
      self.max_seq_len = net.max_seq_len
  
file_path: reformer-pytorch/reformer_pytorch/generative_tools.py
imports: from functools import partial
  import torch
  from torch import nn
  import torch.nn.functional
  from torch.nn.utils.rnn import pad_sequence
  from reformer_pytorch.reformer_pytorch import ReformerLM
  from reformer_pytorch.autopadder import Autopadder
label_desc: Use image node_id 1 to create a new TrainingWrapper object from inherited base classes: nn with example: obj = TrainingWrapper(net, ignore_index, pad_value)