code: def _padded_bin(i, nbits):
      s = to_bin(i)
      while len(s) < nbits:
          s = "0" + s
      return s
  
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 7 for calling a global function with example usage: _padded_bin(i, nbits) and returns: s