def METHOD_NAME(compile_time_path, caption='', lines_range=None, lang='python'):
    """
    Generates listing lines to include
    :param compile_time_path: list of os.path primitives
    :param lines_range: tuple of two ints
    :return: rst lines
    """
    path = os.path.join(*compile_time_path)
    if not os.path.isfile(path):
        print('File not found: {} (compile time path)'.format(path))
        return []
    docs_time_path = [os.path.pardir] * 2 + list(compile_time_path)
    path = os.path.join(*docs_time_path)
    result = [
        '.. literalinclude:: {}'.format(path),
        '    :language: {}'.format(lang),
        '    :linenos:'
    ]
    if caption:
        result.append('    :caption: {}'.format(caption))
    if lines_range:
        result.append('    :lines: {}-{}'.format(lines_range[0], lines_range[1]))
    result.append('')
    return result