def _preprocess_list(self, l):
        """Internal utility that preprocesses the given list---which is
        presumed to be a list defining the samples that should be imported---by
        applying the values of the ``shuffle``, ``seed``, and ``max_samples``
        parameters of the importer.

        You may also provide an iterable, in which case the output will also be
        an iterable, unless the elements must be shuffled, in which case the
        iterable must be read in-memory into a list and returned as a list.

        Args:
            l: a list or iterable

        Returns:
            a processed copy of the list/iterable
        """
        if self.shuffle:
            _random = _get_rng(self.seed)
            l = list(l).copy()
            _random.shuffle(l)

        if self.max_samples is not None:
            if isinstance(l, (list, tuple)):
                l = l[: self.max_samples]
            else:
                l = itertools.islice(l, self.max_samples)

        return l
Internal utility that preprocesses the given list---which is
        presumed to be a list defining the samples that should be imported---by
        applying the values of the ``shuffle``, ``seed``, and ``max_samples``
        parameters of the importer.

        You may also provide an iterable, in which case the output will also be
        an iterable, unless the elements must be shuffled, in which case the
        iterable must be read in-memory into a list and returned as a list.

        Args:
            l: a list or iterable

        Returns:
            a processed copy of the list/iterable
        
fiftyone/utils/data/importers.py