docstr: Build a ModuleList of Linear transformations for the given num_output_layers
  
  The final layer size can be specified.
  Initial layer size is the combination of word, constituent, and transition vectors
  Middle layer sizes are self.hidden_size
code: def build_output_layers(
      self, num_output_layers, final_layer_size, maxout_k
  ):
      """
      Build a ModuleList of Linear transformations for the given num_output_layers
  
      The final layer size can be specified.
      Initial layer size is the combination of word, constituent, and transition vectors
      Middle layer sizes are self.hidden_size
      """
      middle_layers = num_output_layers - 1
      # word_lstm:         hidden_size * num_tree_lstm_layers
      # transition_stack:  transition_hidden_size
      # constituent_stack: hidden_size
      predict_input_size = [
          self.hidden_size
          + self.hidden_size * self.num_tree_lstm_layers
          + self.transition_hidden_size
      ] + [self.hidden_size] * middle_layers
      predict_output_size = [self.hidden_size] * middle_layers + [
          final_layer_size
      ]
      if not maxout_k:
          output_layers = nn.ModuleList(
              [
                  nn.Linear(input_size, output_size)
                  for input_size, output_size in zip(
                      predict_input_size, predict_output_size
                  )
              ]
          )
          for output_layer, input_size in zip(
              output_layers, predict_input_size
          ):
              initialize_linear(
                  output_layer, self.args["nonlinearity"], input_size
              )
      else:
          output_layers = nn.ModuleList(
              [
                  MaxoutLinear(input_size, output_size, maxout_k)
                  for input_size, output_size in zip(
                      predict_input_size, predict_output_size
                  )
              ]
          )
      return output_layers
  
imports: from collections import namedtuple
  from enum import Enum
  import logging
  import math
  import random
  import torch
  import torch.nn
  from torch.nn.utils.rnn import pack_padded_sequence
  from stanza.models.common.bert_embedding import extract_bert_embeddings
  from stanza.models.common.maxout_linear import MaxoutLinear
  from stanza.models.common.utils import unsort
  from stanza.models.common.vocab import PAD_ID, UNK_ID
  from stanza.models.constituency.base_model import BaseModel
  from stanza.models.constituency.label_attention import LabelAttentionModule
  from stanza.models.constituency.lstm_tree_stack import LSTMTreeStack
  from stanza.models.constituency.parse_transitions import TransitionScheme
  from stanza.models.constituency.parse_tree import Tree
  from stanza.models.constituency.partitioned_transformer import PartitionedTransformerModule
  from stanza.models.constituency.positional_encoding import ConcatSinusoidalEncoding
  from stanza.models.constituency.transformer_tree_stack import TransformerTreeStack
  from stanza.models.constituency.tree_stack import TreeStack
  from stanza.models.constituency.utils import build_nonlinearity, initialize_linear
label_desc: Use image node_id 6 for calling the LSTMModel obj's underlying member method code with example usage: obj.build_output_layers(num_output_layers, final_layer_size, maxout_k) and returns: output_layers