code: def test_numba_context(c, dtype):
      ctx, nb_ctx = context_choices[c]
      size = 10
      with nb_cuda.gpus[0]:
          arr, cbuf = make_random_buffer(
              size, target="device", dtype=dtype, ctx=ctx
          )
          assert cbuf.context.handle == nb_ctx.handle.value
          mem = cbuf.to_numba()
          darr = DeviceNDArray(
              arr.shape, arr.strides, arr.dtype, gpu_data=mem
          )
          np.testing.assert_equal(darr.copy_to_host(), arr)
          darr[0] = 99
          cbuf.context.synchronize()
          arr2 = np.frombuffer(cbuf.copy_to_host(), dtype=dtype)
          assert arr2[0] == 99
  
file_path: arrow/python/pyarrow/tests/test_cuda_numba_interop.py
imports: import pytest
  import pyarrow
  import numpy
  from numba.cuda.cudadrv.devicearray import DeviceNDArray
label_desc: Use image node_id 8 for calling a global function with example usage: test_numba_context(c, dtype) without return types