class_docstr: A helper class for testing the pass manager.
docstr: Perform optimization on node.
docstr_tok: ["Perform","optimization","on","node","."]
code: def transform(node, ctx=None):
      """Perform optimization on node."""
      if isinstance(node, tvm.IRModule):
          # Add a function to the module and return an updated module.
          gv, func = get_var_func()
          mod = tvm.IRModule({gv: func})
          mod.update(node)
          return mod
      if isinstance(node, relay.Function):
          return update_func(node)
  
      raise TypeError("Found not supported node type.")
  
imports: import numpy
  import pytest
  import tvm
  from tvm import te
  from tvm import relay
  from tvm.relay import ExprFunctor
  from tvm.relay import Function, Call
  from tvm.relay import analysis
  from tvm.relay import transform
  from tvm.ir import instrument
  from tvm.relay.testing import run_infer_type
  import tvm.testing
label_desc: Use image node_id 3 for calling the OptTester obj's underlying member method code with example usage: obj.transform(node, ctx) and returns: mod, update_func