def _split_header(code):
    """Extract the Implectus header from a generated code string."""
    lines = code.splitlines()
    assert len(lines) > 3
    assert lines[0].startswith("# # Autogenerated"), "Missing header"
    assert lines[1].startswith("# This file was"), "Missing header"
    assert lines[2].startswith("# edit `"), "Missing header"
    assert not lines[3], "Missing gap"
    return "\n".join(lines[:3]), "\n".join(lines[4:])