def METHOD_NAME(
    source_file: SourceFile,
    source_file_lines: List[str],
    coverage_info: SourceFileTraceabilityInfo,
):
    assert isinstance(source_file, SourceFile)
    assert isinstance(source_file_lines, list)
    assert isinstance(coverage_info, SourceFileTraceabilityInfo)
    if source_file.is_python_file():
        lexer = PythonLexer()
    elif source_file.is_c_file():
        lexer = CLexer()
    elif source_file.is_cpp_file():
        lexer = CppLexer()
    elif source_file.is_tex_file():
        lexer = TexLexer()
    elif source_file.is_jinja_file():
        lexer = HtmlDjangoLexer()
    else:
        raise NotImplementedError(source_file)
    # HACK:
    # Otherwise, Pygments will skip the first line as if it does not exist.
    # This behavior surprisingly affects on the first line if its empty.
    hack_first_line: bool = False
    if source_file_lines[0] == "\n":
        source_file_lines[0] = " \n"
        hack_first_line = True
    # HACK:
    # Pygments does not process lines if they are empty and are at the end
    # of a file. Adding a marker to the end so that Pygments do not cut the
    # corners.
    source_file_content = "".join(source_file_lines)
    source_file_content_with_marker = source_file_content + "\n###"
    html_formatter = HtmlFormatter()
    pygmented_source_file_content = highlight(
        source_file_content_with_marker, lexer, html_formatter
    )
    # HACK: split content into lines by cutting off the header and footer
    # parts generated by Pygments:
    # <div class="highlight"><pre> and </pre></div>
    # TODO: Implement proper splitting.
    start_pattern = '<div class="highlight"><pre>'
    end_pattern = "</pre></div>\n"
    assert pygmented_source_file_content.startswith(start_pattern)
    assert pygmented_source_file_content.endswith(
        end_pattern
    ), f"{pygmented_source_file_content}"
    slice_start = len(start_pattern)
    slice_end = len(pygmented_source_file_content) - len(end_pattern)
    pygmented_source_file_content = pygmented_source_file_content[
        slice_start:slice_end
    ]
    pygmented_source_file_lines = pygmented_source_file_content.split("\n")
    if hack_first_line:
        pygmented_source_file_lines[0] = "<span></span>"
    if pygmented_source_file_lines[-1] == "":
        pygmented_source_file_lines.pop()
    assert (
        "###" in pygmented_source_file_lines[-1]
    ), "Expected marker to be in place."
    # Pop ###, pop "\n"
    pygmented_source_file_lines.pop()
    pygmented_source_file_lines.pop()
    assert len(pygmented_source_file_lines) == len(source_file_lines), (
        f"Something went wrong when running Pygments against "
        f"the source file: "
        f"{len(pygmented_source_file_lines)} == {len(source_file_lines)}"
    )
    for pragma in coverage_info.pragmas:
        pragma_line = pragma.ng_source_line_begin
        source_line = source_file_lines[pragma_line - 1]
        assert len(pragma.reqs_objs) > 0
        before_line = source_line[
            : pragma.reqs_objs[0].ng_source_column - 1
        ].rstrip("/")
        closing_bracket_index = source_line.index("]")
        after_line = source_line[closing_bracket_index:].rstrip()
        before_line = html.escape(before_line)
        after_line = html.escape(after_line)
        pygmented_source_file_lines[pragma_line - 1] = (
            before_line,
            after_line,
            pragma,
        )
    pygments_styles = html_formatter.get_style_defs(".highlight")
    return pygmented_source_file_lines, pygments_styles