code: def ravel_index(indices, shape):
      """Flatten the index tuple to 1D
  
      Parameters
      ----------
      indices : tuple of int or tvm.tir.IntImm
          The input coordinates
  
      shape : tuple of int
          Shape of the tensor.
  
      Returns
      -------
      idx : int or Expr
          The index after flattening
      """
      idx = None
      for i, (shape_val, ind) in enumerate(zip(shape, indices)):
          if i != 0:
              idx = idx * shape_val + ind
          else:
              idx = ind
      return idx
  
imports: from __future__ import absolute_import
  from numbers import Integral
  import numpy
  import tvm
  from tvm import te
  from tvm.tir import Any, SizeVar, bijective_layout, layout
  from .None import cpp, tag
label_desc: Use image node_id 14 for calling a global function with example usage: ravel_index(indices, shape) and returns: idx