def METHOD_NAME(cls, filename: str, remove_dep_on_pkg: str) -> str:
    """
    Returns the content of the requirements.txt file with the dependency on `remove_dep_on_pkg` removed.
    This method preserves all the comments.
    """
    if not os.path.exists(filename):
        raise Exception(f"File {filename} doesn't exist")
    result = ""
    line_continuation_buffer = ""
    with open(filename, "r", encoding="utf-8") as fd:
        for line in fd.readlines():
            if line_continuation_buffer:
                line_continuation_buffer += line
                if not line.endswith("\\"):
                    if Requirement.parse(line_continuation_buffer).key != remove_dep_on_pkg:
                        result += line_continuation_buffer
                    line_continuation_buffer = ""
            elif not line.strip() or line.strip().startswith("#"):
                result += line
            elif line.endswith("\\"):
                line_continuation_buffer = line
            elif Requirement.parse(line).key != remove_dep_on_pkg.lower():
                result += line
            else:
                # Dependency matches `remove_dep_on_pkg` => Remove line from result
                pass
    return result