code: def _run_kernel(self, kernel, options):
      try:
          ctx = self.shell.user_ns["cl_ctx"]
      except KeyError:
          ctx = None
  
      if not isinstance(ctx, cl.Context):
          ctx = None
  
      if ctx is None:
          try:
              ctx = self.shell.user_ns["ctx"]
          except KeyError:
              ctx = None
  
      if ctx is None or not isinstance(ctx, cl.Context):
          raise RuntimeError(
              "unable to locate cl context, which must be "
              "present in namespace as 'cl_ctx' or 'ctx'"
          )
  
      prg = cl.Program(ctx, kernel).build(options=options.split())
  
      for knl in prg.all_kernels():
          self.shell.user_ns[knl.function_name] = knl
  
file_path: pyopencl/pyopencl/ipython_ext.py
imports: from IPython.core.magic import magics_class, Magics, cell_magic, line_magic
  import pyopencl
label_desc: Use image node_id 1 for calling the PyOpenCLMagics obj's underlying member method code with example usage: obj._run_kernel(kernel, options) without return types