def get_stats(arr, function, *args, **kwargs):
    charge_start = get_current_charge()
    for i in range(NUM_PASSES):
        arr[i] = function(*args, **kwargs)
    charge_end = get_current_charge()
    mean = arr.mean()
    std = arr.std()
    return [mean, std, (charge_start - charge_end)]
def get_stats(arr, function, *args, **kwargs):
    charge_start = get_current_charge()
    for i in range(NUM_PASSES):
        arr[i] = function(*args, **kwargs)
    charge_end = get_current_charge()
    mean = arr.mean()
    std = arr.std()
    return [mean, std, (charge_start - charge_end)]