def METHOD_NAME(self, n, dtype):
    r"""Check that hafnian(x \otimes x) = hafnian(J_2n)*prod(x)"""
    x = np.random.rand(2 * n) + 1j * np.random.rand(2 * n)
    if not np.iscomplex(dtype()):
        x = x.real
    x = dtype(x)
    A = np.outer(x, x)
    rpt = np.ones([2 * n], dtype=np.int32)
    haf = hafnian_repeated(A, rpt)
    expected = np.prod(x) * fac(2 * n) / (fac(n) * (2**n))
    assert np.allclose(haf, expected)