def _redirect_aggs(arg):
    """ Redirect aggregations to their corresponding name in cuDF
    """
    redirects = {
        sum: "sum",
        max: "max",
        min: "min",
        list: "collect",
        "list": "collect",
    }
    if isinstance(arg, dict):
        new_arg = dict()
        for col in arg:
            if isinstance(arg[col], list):
                new_arg[col] = [redirects.get(agg, agg) for agg in arg[col]]
            else:
                new_arg[col] = redirects.get(arg[col], arg[col])
        return new_arg
    if isinstance(arg, list):
        return [redirects.get(agg, agg) for agg in arg]
    return redirects.get(arg, arg)