def METHOD_NAME(self, operator, states, expected):
    result = qutip.expect(operator, states)
    expected_dtype = np.float64 if operator.isherm else np.complex128
    assert isinstance(result, np.ndarray)
    assert result.dtype == expected_dtype
    assert list(result) == list(expected)