def METHOD_NAME(self, field_data, lbpack, mask):
    # Calls pp._data_bytes_to_shaped_array with the necessary mocked
    # items, an lbpack instance, the correct data shape and mask instance.
    with mock.patch("numpy.frombuffer", return_value=field_data):
        data = pp._data_bytes_to_shaped_array(
            mock.Mock(),
            self.create_lbpack(lbpack),
            None,
            mask.shape,
            np.dtype(">f4"),
            -999,
            mask=mask,
        )
    return ma.masked_array(data, np.isnan(data), fill_value=-999)