def METHOD_NAME(self, fields):
    side_effect_fields = list(fields)[:]
    def make_pp_field_override(*args):
        # Iterates over the fields passed to this context manager,
        # until there are no more, upon which the np.fromfile
        # returns an empty list and the while loop in load() is
        # broken.
        result = side_effect_fields.pop(0)
        if not side_effect_fields:
            np.fromfile.return_value = []
        return result
    open_func = "builtins.open"
    with mock.patch("numpy.fromfile", return_value=[0]), mock.patch(
        open_func
    ), mock.patch("struct.unpack_from", return_value=[4]), mock.patch(
        "iris.fileformats.pp.make_pp_field",
        side_effect=make_pp_field_override,
    ):
        yield