def METHOD_NAME(queue, gamma, coef0, degree, dtype):
    rng = np.random.RandomState(0)
    X = np.array(2 * rng.random_sample((10, 4)), dtype=dtype)
    Y = np.array(2 * rng.random_sample((15, 4)), dtype=dtype)
    result = poly_kernel(X, Y, gamma=gamma, coef0=coef0, degree=degree, queue=queue)
    expected = (gamma * np.dot(X, np.array(Y).T) + coef0) ** degree
    tol = 1e-14 if result.dtype == np.float64 else 1e-5
    assert_allclose(result, expected, rtol=tol)