code: def transpose(self, name=None, activate_final=None):
      
      if name is None:
        name = self.module_name + "_transpose"
      if activate_final is None:
        activate_final = self.activate_final
      output_sizes = [lambda l=layer: l.input_shape[1] for layer in self._layers]
      output_sizes.reverse()
      return MLP(
          name=name,
          output_sizes=output_sizes,
          activation=self.activation,
          activate_final=activate_final,
          initializers=self.initializers,
          partitioners=self.partitioners,
          regularizers=self.regularizers,
          use_bias=self.use_bias,
          use_dropout=self.use_dropout)
docs: Returns transposed `MLP`.
  
      Args:
        name: Optional string specifying the name of the transposed module. The
          default name is constructed by appending "_transpose"
          to `self.module_name`.
        activate_final: Optional boolean determining if the activation and batch
          normalization, if turned on, are applied to the final layer.
  
      Returns:
        Matching transposed `MLP` module.