code: def _generate_indices_ops(ndim, int_type, offsets):
      code = (
          "{type} ind_{j} = _i % ysize_{j} - {offset}; _i /= ysize_{j};"
      )
      body = [
          code.format(type=int_type, j=j, offset=offsets[j])
          for j in range(ndim - 1, 0, -1)
      ]
      return "{type} _i = i;\n{body}\n{type} ind_0 = _i - {offset};".format(
          type=int_type, body="\n".join(body), offset=offsets[0]
      )
  
file_path: cupy/cupyx/scipy/ndimage/_util.py
imports: import warnings
  import numpy
  import cupy
label_desc: Use image node_id 11 for calling a global function with example usage: _generate_indices_ops(ndim, int_type, offsets) and returns: str