code: def _generate_shape(ndim, int_type, var_name="out", raw_var=True):
      code = ""
      if not raw_var:
          var_name = "_raw_" + var_name
      for i in range(ndim):
          code += f"{int_type} shape_{i} = {var_name}.shape()[{i}];\n"
      return code
  
imports: import math
  import numbers
  import os
  import cupy
  from ._util import _get_inttype
label_desc: Use image node_id 8 for calling a global function with example usage: _generate_shape(ndim, int_type, var_name, raw_var) and returns: code