def daily_usage_df(df, agg_functions, client_fields=client_fields):
    """
    generic function for rolling up experiment pings into a
    (client_id, branch, activity date) level
        note: the client_fields above are assumed to be provided by default
        note: you have to provide the agg functions and decide the roll up
              logic inside them individually
    """
    if client_fields:
        agg_functions = client_fields + agg_functions
    return df.groupby(['client_id', 'branch', 'activity_dt']).agg(*
        agg_functions)
