def apply(
        self,
        params: CalibParams,
        outputs: Array,
        mutable: Optional[CalibMutable] = None,
        calib: bool = False,
        rng: Optional[jax.Array] = None,
    ) -> Union[jnp.ndarray, Tuple[jnp.ndarray, PyTree]]:
        """
        Apply the output calibrator forward pass.

        Parameters
        ----------
        params : Params
            The random parameters of the probabilistic model.
        outputs : Array
            Outputs for each data point.
        mutable : Optional[Mutable]
            The mutable objects used to evaluate the models.
        calib : bool
            Whether the method is called during calibration.
        rng: Optional[jax.Array]
            A random number generator.
            If not passed,
            this will be taken from the attributes of this class.

        Returns
        -------
        Union[jnp.ndarray, Tuple[jnp.ndarray, PyTree]]
            The output of the model manager for each input. Mutable objects may also be returned.
        """
        if self.output_calibrator is None:
            return outputs
        if mutable is None:
            mutable = False
        variables = params.unfreeze()

        # setup dropout key
        if rng is not None:
            rng, dropout_rng = random.split(rng, 2)
            rngs = {"dropout": dropout_rng}
        else:
            rngs = None

        if mutable:
            mutable_variables = mutable.unfreeze()
            variables.update(mutable_variables)
            mutable = list(mutable_variables.keys())
        if calib and mutable:
            outputs, mutable = self.output_calibrator.apply(
                variables, outputs, mutable=mutable, train=calib, rngs=rngs
            )
            return outputs, {"mutable": mutable}
        else:
            return self.output_calibrator.apply(
                variables, outputs, train=calib, mutable=False, rngs=rngs
            )

        Apply the output calibrator forward pass.

        Parameters
        ----------
        params : Params
            The random parameters of the probabilistic model.
        outputs : Array
            Outputs for each data point.
        mutable : Optional[Mutable]
            The mutable objects used to evaluate the models.
        calib : bool
            Whether the method is called during calibration.
        rng: Optional[jax.Array]
            A random number generator.
            If not passed,
            this will be taken from the attributes of this class.

        Returns
        -------
        Union[jnp.ndarray, Tuple[jnp.ndarray, PyTree]]
            The output of the model manager for each input. Mutable objects may also be returned.
        
fortuna/output_calibrator/output_calib_manager/base.py