human
I wrote the below code

    num_points = cwt.shape[1]
    if (min_length is None):
        min_length = np.ceil((cwt.shape[0] / 4))
    if (window_size is None):
        window_size = np.ceil((num_points / 20))
    window_size = int(window_size)
    (hf_window, odd) = divmod(window_size, 2)
    row_one = cwt[0, :]
    noises = np.zeros_like(row_one)
    for (ind, val) in enumerate(row_one):
        window_start = max((ind - hf_window), 0)
        window_end = min(((ind + hf_window) + odd), num_points)
        noises[ind] = scoreatpercentile(row_one[window_start:window_end], per=noise_perc)
    def filt_func(line):
        if (len(line[0]) < min_length):
            return False
        snr = abs((cwt[(line[0][0], line[1][0])] / noises[line[1][0]]))
        if (snr < min_snr):
            return False
        return True
    return list(filter(filt_func, ridge_lines))

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

def _filter_ridge_lines(cwt, ridge_lines, window_size=None, min_length=None, min_snr=1, noise_perc=10):