def split(self, n_data: int) -> Tuple[DataLoader, DataLoader]:
        """
        Split a data loader into two data loaders.

        Parameters
        ----------
        n_data: int
            Number of data point after which the data loader should be split. The first returned data loader will
            contain exactly `n_data` data points. The second one will contain the remaining ones.

        Returns
        -------
        Tuple[DataLoader, DataLoader]
            The two data loaders made out of the original one.
        """

        def data_loader1():
            count = 0
            for inputs, targets in self:
                if count == n_data:
                    break
                if count + inputs.shape[0] <= n_data:
                    count += inputs.shape[0]
                    yield inputs, targets
                else:
                    inputs, targets = (
                        inputs[: n_data - count],
                        targets[: n_data - count],
                    )
                    count = n_data
                    yield inputs, targets

        def data_loader2():
            count = 0
            for inputs, targets in self:
                if count > n_data:
                    yield inputs, targets
                elif (count <= n_data) and (count + inputs.shape[0] > n_data):
                    count2 = count
                    count += inputs.shape[0]
                    inputs, targets = (
                        inputs[n_data - count2 :],
                        targets[n_data - count2 :],
                    )
                    yield inputs, targets
                else:
                    count += inputs.shape[0]

        return self.from_callable_iterable(data_loader1), self.from_callable_iterable(
            data_loader2
        )

        Split a data loader into two data loaders.

        Parameters
        ----------
        n_data: int
            Number of data point after which the data loader should be split. The first returned data loader will
            contain exactly `n_data` data points. The second one will contain the remaining ones.

        Returns
        -------
        Tuple[DataLoader, DataLoader]
            The two data loaders made out of the original one.
        
fortuna/data/loader/array_loaders.py