code: def test_copy_buffer(ctx_factory):
      context = ctx_factory()
  
      queue = cl.CommandQueue(context)
      mf = cl.mem_flags
  
      rng = np.random.default_rng(seed=42)
      a = rng.random(50000, dtype=np.float32)
      b = np.empty_like(a)
  
      buf1 = cl.Buffer(
          context, mf.READ_ONLY | mf.COPY_HOST_PTR, hostbuf=a
      )
      buf2 = cl.Buffer(context, mf.WRITE_ONLY, b.nbytes)
  
      cl.enqueue_copy(queue, buf2, buf1).wait()
      cl.enqueue_copy(queue, b, buf2).wait()
  
      assert la.norm(a - b) == 0
  
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 12 for calling a global function with example usage: test_copy_buffer(ctx_factory) without return types