def _is_def_line(line):
    return (line.endswith(':') and not 'class' in line.split() and
            (line.startswith('def ') or
             line.startswith('cdef ') or
             line.startswith('cpdef ') or
             ' def ' in line or ' cdef ' in line or ' cpdef ' in line))
Returns range of pages that contains current page and few pages before and after it.
dataset/ETHPy150Open pydata/pandas/scripts/file_sizes.py/_is_def_line--crossover with--dataset/ETHPy150Open diefenbach/django-lfs/lfs/core/utils.py/define_page_range