    def map_enumerate(
        self, function: t.Callable[[T, Ti], To], iterable: t.Iterable[Ti]
    ) -> Params[To]:
        """
        Apply function that takes two arguments with given iterable as index to all none empty field in Params.
        """
        if self.args:
            return Params[To](
                *tuple(function(a, b) for a, b in zip(self.args, iterable))
            )
        return Params[To](
            **{k: function(self.kwargs[k], b) for k, b in zip(self.kwargs, iterable)}
        )
Apply function that takes two arguments with given iterable as index to all none empty field in Params.
src/bentoml/_internal/runner/utils.py