    def agg(
        cls,
        params_list: t.Sequence[Params[Ti]],
        agg_func: t.Callable[[t.Sequence[Ti]], To] = pass_through,
    ) -> Params[To]:
        """
        Aggregate a list of Params into a single Params by performing the aggregate
        function on the list of values at the same position.
        """
        if not params_list:
            return Params()

        args = tuple(
            agg_func(tuple(params.args[i] for params in params_list))
            for i, _ in enumerate(params_list[0].args)
        )
        kwargs = {
            k: agg_func(tuple(params.kwargs[k] for params in params_list))
            for k in params_list[0].kwargs
        }
        return Params(*args, **kwargs)
Aggregate a list of Params into a single Params by performing the aggregate
function on the list of values at the same position.
src/bentoml/_internal/runner/utils.py