class_docstr: Transformer decoder consisting of *args.decoder_layers* layers. Each layer
  is a :class:`TransformerAANDecoderLayer`.
class_docstr_tok: ["Transformer","decoder","consisting","of","*","args.decoder_layers","*","layers",".","Each","layer","is","a",":","class",":","`","TransformerAANDecoderLayer","`","."]
docstr: Maximum output length supported by the decoder.
code: def max_positions(self):
      """Maximum output length supported by the decoder."""
      if self.embed_positions is None:
          return self.max_target_positions
      return min(
          self.max_target_positions, self.embed_positions.max_positions
      )
  
imports: import math
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import options, utils
  from fairseq.models import FairseqEncoderDecoderModel, FairseqIncrementalDecoder, register_model, register_model_architecture, transformer
  from fairseq.modules import AdaptiveSoftmax, LearnedPositionalEmbedding, MultiheadAttention, SinusoidalPositionalEmbedding
  from pytorch_translate import transformer, vocab_reduction
  from pytorch_translate.average_attention import AverageAttention, AverageWindowAttention
  from pytorch_translate.utils import torch_find
label_desc: Use image node_id 4 for calling the TransformerAANDecoder obj's underlying member method code with example usage: obj.max_positions() and returns: min, self