code: def forward(self, x, mask):
          
          all_layers = []
          for layer in self.layers:
              x = layer(x, mask)
              if self.return_all_layers:
                  all_layers.append(x)
  
          if self.return_all_layers:
              all_layers[-1] = self.norm(all_layers[-1])
              return all_layers
          return self.norm(x)
docs: Pass the input (and mask) through each layer in turn.