code: def _get_generator(context):
      if context.devices[0].type & cl.device_type.CPU:
          gen = PhiloxGenerator(context)
      else:
          gen = ThreefryGenerator(context)
  
      return gen
  
imports: import pyopencl
  import pyopencl.array
  import pyopencl.cltypes
  from pyopencl.tools import first_arg_dependent_memoize
  from pytools import memoize_method
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _get_generator(context) and returns: gen