def METHOD_NAME(self, random_matrix):
    """Check 2x2 hafnian"""
    A = random_matrix(2)
    rpt = np.ones([2], dtype=np.int32)
    haf = hafnian_repeated(A, rpt)
    assert np.allclose(haf, A[0, 1])