def METHOD_NAME(fields, set_fields):
    """Check whether the fields set in `fields` (a `Fields` object) are those
    in `set_fields` (a list of strings)."""
    assert fields.data == ("data" in set_fields)
    assert fields.flags == ("flags" in set_fields)
    assert fields.weights == ("weights" in set_fields)
    assert fields.uvw == ("uvw" in set_fields)