code: def test_clrandom_dtypes(ctx_factory, rng_class, dtype):
      cl_ctx = ctx_factory()
      if dtype == np.float64 and not has_double_support(
          cl_ctx.devices[0]
      ):
          pytest.skip("double precision not supported on this device")
      rng = rng_class(cl_ctx)
  
      size = 10
  
      with cl.CommandQueue(cl_ctx) as queue:
          device = queue.device
          if (
              device.platform.vendor == "The pocl project"
              and device.type & cl.device_type.GPU
              and rng_class is make_ranlux_generator
          ):
              pytest.xfail(
                  "ranlux test fails on PoCL + Nvidia,"
                  "at least the K40, as of PoCL 1.6, 2021-01-20"
              )
  
          rng.uniform(queue, size, dtype)
  
          if dtype not in (np.int32, np.int64):
              rng.normal(queue, size, dtype)
  
file_path: pyopencl/test/test_clrandom.py
imports: import numpy
  import pytest
  import pyopencl
  import pyopencl.cltypes
  import pyopencl.clrandom
  from pyopencl.tools import pytest_generate_tests_for_pyopencl
  from pyopencl.characterize import has_double_support
label_desc: Use image node_id 2 for calling a global function with example usage: test_clrandom_dtypes(ctx_factory, rng_class, dtype) without return types