class_docstr: Transformer encoder consisting of *cfg.encoder.layers* layers. Each layer
  is a :class:`TransformerEncoderLayer`.
  
  Args:
      args (argparse.Namespace): parsed command-line arguments
      dictionary (~fairseq.data.Dictionary): encoding dictionary
      embed_tokens (torch.nn.Embedding): input embedding
class_docstr_tok: ["Transformer","encoder","consisting","of","*","cfg.encoder.layers","*","layers",".","Each","layer","is","a",":","class",":","`","TransformerEncoderLayer","`",".","Args",":","args","(","argparse.Namespace",")",":","parsed","command-line","arguments","dictionary","(","~fairseq.data.Dictionary",")",":","encoding","dictionary","embed_tokens","(","torch.nn.Embedding",")",":","input","embedding"]
docstr: Maximum input length supported by the encoder.
docstr_tok: ["Maximum","input","length","supported","by","the","encoder","."]
code: def max_positions(self):
      """Maximum input length supported by the encoder."""
      if self.embed_positions is None:
          return self.max_source_positions
      return min(
          self.max_source_positions, self.embed_positions.max_positions
      )
  
imports: import math
  from typing import Dict, List, Optional
  import torch
  import torch.nn
  from torch import Tensor
  from fairseq import utils
  from fairseq.distributed import fsdp_wrap
  from fairseq.models import FairseqEncoder
  from fairseq.models.transformer import TransformerConfig
  from fairseq.modules import FairseqDropout, LayerDropModuleList, LayerNorm, PositionalEmbedding, SinusoidalPositionalEmbedding, transformer_layer
  from fairseq.modules.checkpoint_activations import checkpoint_wrapper
  from fairseq.modules.quant_noise import quant_noise
label_desc: Use image node_id 8 for calling the TransformerEncoderBase obj's underlying member method code with example usage: obj.max_positions() and returns: min, self