def make_output_postprocess_fn(
      cls,
      config: ml_collections.ConfigDict  # pylint: disable=unused-argument
  ) -> Callable[[Dict[str, Any], Dict[str, Any]], Dict[str, Any]]:
    """Produces function to postprocess task samples (input and output).

    The method is called occasionally during training or evaluation to save
    model inputs and outputs for manual inspection. Given a input batch and
    model's auxiliary output the method needs to produce JSON-serializable
    dictionary with all the relevant features.

    This default implementation provides a function that returns an empty
    dictionary.

    Args:
      config: contains experiment hyperparameters.

    Returns:
      Function that postprocesses model's input and output for serialization.
    """

    def postprocess_fn(
        batch: Dict[str, Any],  # pylint: disable=unused-argument
        auxiliary_output: Dict[str, Any]  # pylint: disable=unused-argument
    ) -> Dict[str, Any]:
      """Function that prepares model's input and output for serialization."""
      return {}

    return postprocess_fn
Produces function to postprocess task samples (input and output).

    The method is called occasionally during training or evaluation to save
    model inputs and outputs for manual inspection. Given a input batch and
    model's auxiliary output the method needs to produce JSON-serializable
    dictionary with all the relevant features.

    This default implementation provides a function that returns an empty
    dictionary.

    Args:
      config: contains experiment hyperparameters.

    Returns:
      Function that postprocesses model's input and output for serialization.
    
language/mentionmemory/encoders/base_encoder.py