code: def to_bin(n):
      # Py 2.5 has no built-in bin()
      digs = []
      while n:
          digs.append(str(n % 2))
          n >>= 1
  
      return "".join(digs[::-1])
  
imports: from dataclasses import dataclass
  from typing import Optional
  import numpy
  import pyopencl
  import pyopencl.array
  from pyopencl.elementwise import ElementwiseKernel
  from pyopencl.scan import ScanTemplate, GenericScanKernel
  from pyopencl.tools import dtype_to_ctype, get_arg_offset_adjuster_code
  from pytools import memoize, memoize_method
  from mako.template import Template
label_desc: Use image node_id 6 for calling a global function with example usage: to_bin(n) and returns: str