def map_samples(
        self,
        sample_collection: SampleCollection[T],
        map_fcn: Callable[[Union[T, U]], R],
        *,
        iter_fcn: Optional[
            Callable[[SampleCollection[T]], Iterable[Tuple[bson.ObjectId, U]]]
        ] = None,
        progress: Optional[Union[bool, Literal["workers"]]] = None,
        save: bool = False,
        skip_failures: bool = True,
    ) -> Iterator[Tuple[bson.ObjectId, R]]:
        """Applies map function to each sample and returns an iterator of the
        results.

        Args:
            sample_collection (SampleCollection[T]): The sample collection to
              map.
            map_fcn (Callable[[Union[T, U]], R]): The map function to apply to
                each sample.
            iter_fcn (Callable[[T], U]): The function to iterate over the
                sample collection. If not provided the iteration function
                used is `iter_samples`.
            progress (Union[bool, Literal["workers"]]): Whether or
              not and how to render progress.
            save (bool, optional): Whether to save mutated samples mutated in
              the map function. Only valid when using the `iter_fcn` is None.
              Defaults to False.
            skip_failures (bool, optional): Whether to gracefully continue
              without raising an error if the map function raises an exception
              for a sample. Defaults to True.

        Yields:
            Iterator[Tuple[bson.ObjectId, R]]: The sample ID and the result of
              the map function for the sample.
        """
        if progress is None:
            progress = self._default_progress

        if iter_fcn is None:
            iter_fcn = _get_default_sample_iter(save=save)
            # TODO: consider adding this check back in lazily, so that we do not
            #  have to create a full view iterator up front just to validate the
            #  function return type.
            # if check_if_return_is_sample(sample_collection, map_fcn):
            #     raise ValueError("`map_fcn` should not return Samples objects.")
        else:
            if save is True:
                logger.warning("Unable to save when `iter_fcn` is provided")
                
        


        yield from self._map_samples(
            sample_collection,
            iter_fcn,
            map_fcn,
            progress=progress,
            skip_failures=skip_failures,
        )
Applies map function to each sample and returns an iterator of the
        results.

        Args:
            sample_collection (SampleCollection[T]): The sample collection to
              map.
            map_fcn (Callable[[Union[T, U]], R]): The map function to apply to
                each sample.
            iter_fcn (Callable[[T], U]): The function to iterate over the
                sample collection. If not provided the iteration function
                used is `iter_samples`.
            progress (Union[bool, Literal["workers"]]): Whether or
              not and how to render progress.
            save (bool, optional): Whether to save mutated samples mutated in
              the map function. Only valid when using the `iter_fcn` is None.
              Defaults to False.
            skip_failures (bool, optional): Whether to gracefully continue
              without raising an error if the map function raises an exception
              for a sample. Defaults to True.

        Yields:
            Iterator[Tuple[bson.ObjectId, R]]: The sample ID and the result of
              the map function for the sample.
        
fiftyone/core/map/mapper.py