code: def test_enqueue_barrier_marker(ctx_factory):
      ctx = ctx_factory()
      # Still relevant on PoCL 1.0RC1.
      _xfail_if_pocl(
          ctx.devices[0].platform,
          (1, 0),
          "PoCL crashes on enqueue_barrier",
      )
  
      queue = cl.CommandQueue(ctx)
  
      if queue._get_cl_version() >= (
          1,
          2,
      ) and cl.get_cl_header_version() <= (1, 1):
          pytest.skip(
              "CL impl version >= 1.2, header version <= 1.1--cannot be sure "
              "that clEnqueueWaitForEvents is implemented"
          )
  
      cl.enqueue_barrier(queue)
      evt1 = cl.enqueue_marker(queue)
      evt2 = cl.enqueue_marker(queue, wait_for=[evt1])
      cl.enqueue_barrier(queue, wait_for=[evt1, evt2])
  
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 21 for calling a global function with example usage: test_enqueue_barrier_marker(ctx_factory) without return types