def METHOD_NAME(
        num,
        den,
        k=Config.MAX_BACKWARDS_PAD_LENGTH,
        min_visits_to_fill=Config.MIN_CUM_VISITS):
    """
     Adjust for small denominators by using a variable length smoother.
     This smoother starts from the RHS and moves
     leftwards (backwards through time). We cumulatively sum the total
     visits (denominator), until we have observed some minimum number of
     counts, then calculate the sum over that bin. We restrict the
     bin size so to avoid including long-past values.
    Args:
        num: array of covid counts
        den: array of total visits
        k: maximum number of days used to average a correction
        min_visits_to_fill: min number of total visits needed before summing a bin
    Returns:
        dataframes of adjusted covid counts, adjusted visit counts, inclusion array
    """
    if isinstance(den, (pd.DataFrame, pd.Series)):
        den = den.values
    if isinstance(num, (pd.DataFrame, pd.Series)):
        num = num.values
    revden = den[::-1]
    revnum = num[::-1].reshape(-1, 1)
    new_num = np.full_like(revnum, np.nan, dtype=float)
    new_den = np.full_like(revden, np.nan, dtype=float)
    n_rows, n_cols = revnum.shape
    for i in range(n_rows):
        visit_cumsum = revden[i:].cumsum()
        # calculate window to average over
        closest_fill_day = np.where(visit_cumsum >= min_visits_to_fill)[0]
        if len(closest_fill_day) > 0:
            closest_fill_day = min(k, closest_fill_day[0])
        else:
            closest_fill_day = k
        if closest_fill_day == 0:
            new_den[i] = revden[i]
            for j in range(n_cols):
                new_num[i, j] = revnum[i, j]
        else:
            den_bin = revden[i: (i + closest_fill_day + 1)]
            new_den[i] = den_bin.sum()
            for j in range(n_cols):
                num_bin = revnum[i: (i + closest_fill_day + 1), j]
                new_num[i, j] = num_bin.sum()
    new_num = new_num[::-1]
    new_den = new_den[::-1]
    return new_num, new_den