def from_callable_iterable(
        cls: Type[T],
        fun: Callable[[], Iterable[Array]],
    ) -> T:
        """
        Transform a callable iterable into a concrete instance of a subclass of
        :class:`~fortuna.data.loader.BaseTargetsLoader`.

        Parameters
        ----------
        fun: Callable[[], Iterable[Union[Batch, InputData, Array]]],
            A callable iterable of target arrays.

        Returns
        -------
        T
            A concrete instance of a subclass of :class:`~fortuna.data.loader.BaseTargetsLoader`.
        """
        return cls(iterable=IterableData.from_callable(fun))

        Transform a callable iterable into a concrete instance of a subclass of
        :class:`~fortuna.data.loader.BaseTargetsLoader`.

        Parameters
        ----------
        fun: Callable[[], Iterable[Union[Batch, InputData, Array]]],
            A callable iterable of target arrays.

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