code: def test_maxout(pretrain_file):
      """
      Test with and without maxout layers for output
      """
      model = build_model(pretrain_file, "--maxout_k", "0")
      run_forward_checks(model)
      # check the output size & implicitly check the type
      # to check for a particularly silly bug
      assert model.output_layers[-1].weight.shape[0] == len(
          model.transitions
      )
  
      model = build_model(pretrain_file, "--maxout_k", "2")
      run_forward_checks(model)
      assert (
          model.output_layers[-1].linear.weight.shape[0]
          == len(model.transitions) * 2
      )
  
      model = build_model(pretrain_file, "--maxout_k", "3")
      run_forward_checks(model)
      assert (
          model.output_layers[-1].linear.weight.shape[0]
          == len(model.transitions) * 3
      )
  
imports: import os
  import pytest
  import torch
  from stanza.models.common import pretrain
  from stanza.models.common.utils import set_random_seed
  from stanza.models.constituency import parse_transitions
  from stanza.tests import *
  from stanza.tests.constituency import test_parse_transitions
  from stanza.tests.constituency.test_trainer import build_trainer
label_desc: Use image node_id 37 for calling a global function with example usage: test_maxout(pretrain_file) without return types