human
I wrote the below code

    N = len(invalid)
    def inner(invalid, limit):
        limit = min(limit, N)
        windowed = _rolling_window(invalid, (limit + 1)).all(1)
        idx = (set((np.where(windowed)[0] + limit)) | set(np.where(((~ invalid[:(limit + 1)]).cumsum() == 0))[0]))
        return idx
    if (fw_limit == 0):
        f_idx = set(np.where(invalid)[0])
    else:
        f_idx = inner(invalid, fw_limit)
    if (bw_limit == 0):
        return f_idx
    else:
        b_idx = set(((N - 1) - np.asarray(list(inner(invalid[::(-1)], bw_limit)))))
        if (fw_limit == 0):
            return b_idx
    return (f_idx & b_idx)

What's a good function header?

Here's a good function header?
assistant
#Here's a good function header.

def _interp_limit(invalid, fw_limit, bw_limit):