code: def test_simplify_fc_transpose():
      data = relay.var("data", shape=(1, 32), dtype="float32")
      x = relay.nn.relu(data)
      w1 = relay.var("w1", shape=(32, 64), dtype="float32")
      y = relay.nn.dense(x, relay.transpose(w1, axes=[1, 0]))
      z = relay.nn.relu(y)
      w2 = relay.var("w2", shape=(64, 16), dtype="float32")
      zz = relay.nn.dense(z, relay.transpose(w2, axes=[1, 0]))
      func = relay.Function(relay.analysis.free_vars(zz), zz)
      params = {
          "w1": tvm.nd.array(
              np.random.uniform(-1, 1, (32, 64)).astype("float32")
          ),
          "w2": tvm.nd.array(
              np.random.uniform(-1, 1, (64, 16)).astype("float32")
          ),
      }
      x_np = np.random.randn(1, 32).astype("float32")
      old_result = run_func(func, params, x_np)
  
      new_func, new_params = simplify_fc_transpose.convert(func, params)
      new_result = run_func(new_func, new_params, x_np)
      np.testing.assert_allclose(
          old_result, new_result, atol=1e-5, rtol=1e-5
      )
  
file_path: tvm/tests/python/relay/test_simplify_fc_transpose.py
imports: import itertools
  import numpy
  import scipy.sparse
  import tvm
  from tvm.ir import IRModule
  from tvm import relay
  from tvm.relay.data_dep_optimization import simplify_fc_transpose
label_desc: Use image node_id 2 for calling a global function with example usage: test_simplify_fc_transpose() without return types