def get_lines_from_file(filename, lineno, context_lines):
    """
    Returns context_lines before and after lineno from file.
    Returns (pre_context_lineno, pre_context, context_line, post_context).
    """

    get_lines = lambda s, e: [linecache.getline(filename, l).rstrip() for l in range(s, e)]

    lower_bound = max(1, context_lines - lineno)
    upper_bound = lineno + context_lines
    linecache.checkcache(filename)
    pre_context = get_lines(lower_bound, lineno)
    context_line = linecache.getline(filename, lineno).rstrip()
    post_context = get_lines(lineno + 1, upper_bound)
    return lower_bound, pre_context, context_line, post_context
dataset/ETHPy150Open dailymuse/oz/oz/error_pages/__init__.py/get_lines_from_file/swapped operands of `-`