def init(
        cls,
        params: CalibParams,
        mutable: Optional[CalibMutable] = None,
        optimizer: Optional[OptaxOptimizer] = None,
        **kwargs,
    ) -> Any:
        """
        Initialize an output calibration state.

        Parameters
        ----------
        params : CalibParams
            The calibration parameters.
        optimizer : Optional[OptaxOptimizer]
            An Optax optimizer associated with the calibration state.
        mutable : Optional[CalibMutable]
            The calibration mutable objects.

        Returns
        -------
        Any
            A calibration state.
        """
        return cls(
            apply_fn=None,
            params=params,
            opt_state=(
                kwargs["opt_state"]
                if optimizer is None and "opt_state" in kwargs
                else None if optimizer is None else optimizer.init(params)
            ),
            mutable=mutable,
            step=kwargs.get("step", 0),
            tx=optimizer,
            **{
                k: v
                for k, v in kwargs.items()
                if k not in ["opt_state", "apply_fn", "tx", "step"]
            },
        )

        Initialize an output calibration state.

        Parameters
        ----------
        params : CalibParams
            The calibration parameters.
        optimizer : Optional[OptaxOptimizer]
            An Optax optimizer associated with the calibration state.
        mutable : Optional[CalibMutable]
            The calibration mutable objects.

        Returns
        -------
        Any
            A calibration state.
        
fortuna/output_calib_model/state.py