code: def traverse_inline(s, final_op, callback):
      """Traverse computation graph and do auto inline
  
      Parameters
      ----------
      s: schedule
          The schedule
      final_op: Operation
          The final output operator.
      callback: callable
          The callback function on each op
      """
      visited = set()
  
      def _traverse(op):
          if op in visited:
              return
          visited.add(op)
          if tag.is_injective(op.tag):
              if op not in s.outputs:
                  s[op].compute_inline()
              for tensor in op.input_tensors:
                  if isinstance(tensor.op, tvm.te.ComputeOp):
                      _traverse(tensor.op)
          callback(op)
  
      _traverse(final_op)
  
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 5 for calling a global function with example usage: traverse_inline(s, final_op, callback) without return types