def to_transformed_targets_loader(
        self: T,
        transform: Callable[[Array, Status], Tuple[Array, Status]],
        status: Optional[Status] = None,
    ) -> T:
        """
        From an existing loader of targets, create a loader with transformed targets.

        Parameters
        ----------
        transform : Callable[[Array, Status], Tuple[Array, Status]]
            A transformation function. It takes a batch of targets and returns their transformation. A status may be
            updated during the process.
        status : Optional[Status]
            An initial status. This may include pre-computed objects used by the transformation.

        Returns
        -------
        T
            A concrete instance of a subclass of :class:`~fortuna.data.loader.BaseTargetsLoader`.
        """
        cls = self.__class__
        return cls(
            IterableData.transform_inputs_or_targets_loader(
                loader=self, transform_fn=transform, status=status
            )
        )

        From an existing loader of targets, create a loader with transformed targets.

        Parameters
        ----------
        transform : Callable[[Array, Status], Tuple[Array, Status]]
            A transformation function. It takes a batch of targets and returns their transformation. A status may be
            updated during the process.
        status : Optional[Status]
            An initial status. This may include pre-computed objects used by the transformation.

        Returns
        -------
        T
            A concrete instance of a subclass of :class:`~fortuna.data.loader.BaseTargetsLoader`.
        
fortuna/data/loader/base.py