code: def _generate_indices_ops(ndim, int_type):
      code = f"{int_type} _i = i;\n"
      for j in range(ndim - 1, 0, -1):
          code += f"{int_type} ind_{j} = _i % shape_{j};\n_i /= shape_{j};\n"
      code += f"{int_type} ind_0 = _i;"
      return code
  
imports: import math
  import numbers
  import os
  import cupy
  from ._util import _get_inttype
label_desc: Use image node_id 9 for calling a global function with example usage: _generate_indices_ops(ndim, int_type) and returns: code