class_docstr: ### Generate auto-regressive mask
code: def forward(self, x: torch.Tensor):
      # Create a mask if we haven't created or sizes have changed
      if self.mask is None or self.mask.size(0) != len(x):
          # [Subsequent mask](../utils.html), will mask out tokens from seeing future tokens
          self.mask = subsequent_mask(len(x)).to(x.device)
  
      #
      return self.mask
  
imports: from typing import List
  import torch
  from torch import nn
  from labml_helpers.module import Module
  from labml_nn.transformers import MultiHeadAttention, TransformerLayer
  from labml_nn.transformers.feed_forward import FeedForward
  from labml_nn.transformers.utils import subsequent_mask
label_desc: Use image node_id 2 for calling the AutoregressiveMask obj's underlying member method code with example usage: obj.forward(x) and returns: self