def METHOD_NAME(kpoints_parser, tmpdir):
    """Load a reference KPOINTS parser and check that the write functionality works.
    Here we make sure the write function of the content parser works.
    """
    # Write the loaded reference KPOINTS content to file
    temp_path = str(tmpdir.join('KPOINTS'))
    kpoints_parser.write(temp_path)
    # Load the written KPOINTS using a new content parser instance and compare
    content = None
    with open(temp_path, 'r', encoding='utf8') as handler:
        content = handler.readlines()
    ref_content = [
        '# K-points\n', '     2\n', 'Direct\n', '  0.000000000   0.000000000   0.000000000   1.000000000\n',
        '  0.000000000   0.000000000   0.500000000   1.000000000\n'
    ]
    assert content == ref_content