def write_xpoints_file(bdf_files, cardtype, points, comment=''):
    """writes SPOINTs/EPOINTs"""
    assert isinstance(points, dict), points
    for point_id, point in points.items():
        bdf_files[point.ifile].write(point.write_card())
