code: def replace_io(body, rmap):
      """Replacing tensors usage according to the dict given"""
      # pylint: disable=import-outside-toplevel
      from tvm.tir import stmt_functor
  
      def replace(op):
          if (
              isinstance(op, _stmt.ProducerStore)
              and op.producer.op in rmap.keys()
          ):
              buf = rmap[op.producer.op]
              return _stmt.ProducerStore(buf, op.value, op.indices)
          if (
              isinstance(op, _expr.ProducerLoad)
              and op.producer.op in rmap.keys()
          ):
              buf = rmap[op.producer.op]
              return _expr.ProducerLoad(buf, op.indices)
          return None
  
      return stmt_functor.ir_transform(
          body, None, replace, ["tir.ProducerStore", "tir.ProducerLoad"]
      )
  
file_path: tvm/python/tvm/te/hybrid/utils.py
imports: import ast
  import inspect
  import logging
  import sys
  import numpy
  import tvm.runtime
  from tvm._ffi.base import numeric_types
  from tvm.ir.container import Array
  from tvm.tir import expr
  from tvm.tir import stmt
  from tvm.te.tensor import Tensor
label_desc: Use image node_id 5 for calling a global function with example usage: replace_io(body, rmap) and returns: stmt_functor, None, _stmt, _expr