code: def build_mean_max_reducer(
      hidden_size: int,
  ) -> Model[Ragged, Floats2d]:
      """Reduce sequences by concatenating their mean and max pooled vectors,
      and then combine the concatenated vectors with a hidden layer.
      """
      return chain(
          concatenate(
              cast(Model[Ragged, Floats2d], reduce_last()),
              cast(Model[Ragged, Floats2d], reduce_first()),
              reduce_mean(),
              reduce_max(),
          ),
          Maxout(nO=hidden_size, normalize=True, dropout=0.0),
      )
  
file_path: spacy/spacy/ml/models/spancat.py
imports: from typing import List, Tuple, cast
  from thinc.api import Linear, Logistic, Maxout, Model, chain, concatenate, glorot_uniform_init, list2ragged, reduce_first, reduce_last, reduce_max, reduce_mean, with_getitem
  from thinc.types import Floats2d, Ragged
  from ...tokens import Doc
  from ...util import registry
  from ..extract_spans import extract_spans
label_desc: Use image node_id 2 for calling a global function with example usage: build_mean_max_reducer(hidden_size) and returns: chain