code: def test_map_dtype(ctx_factory, dtype):
      if cl._PYPY:
          # FIXME
          pytest.xfail("enqueue_map_buffer not yet working on pypy")
  
      ctx = ctx_factory()
      queue = cl.CommandQueue(ctx)
  
      dt = np.dtype(dtype)
  
      b = pyopencl.Buffer(
          ctx, pyopencl.mem_flags.READ_ONLY, dt.itemsize
      )
      array, ev = pyopencl.enqueue_map_buffer(
          queue, b, pyopencl.map_flags.WRITE, 0, (1,), dt
      )
      with array.base:
          print(array.dtype)
          assert array.dtype == dt
  
imports: import numpy
  import numpy.linalg
  import pytest
  import pyopencl
  import pyopencl.array
  import pyopencl.cltypes
  import pyopencl.clrandom
  from pyopencl.tools import pytest_generate_tests_for_pyopencl, ImmediateAllocator, DeferredAllocator
  from pyopencl.characterize import get_pocl_version
label_desc: Use image node_id 34 for calling a global function with example usage: test_map_dtype(ctx_factory, dtype) without return types