code: def test_type_relation_sequal():
      t1 = relay.TensorType((1, 2), "float32")
      t2 = relay.TensorType((1, 2, 3), "float32")
      t3 = relay.TensorType((1, 2, 3, 4), "float32")
  
      # functions are compared only by pointer equality so
      # we need to be sure to use the same pointers
      broadcast = tvm.ir.EnvFunc.get(
          "tvm.relay.type_relation.Broadcast"
      )
      identity = tvm.ir.EnvFunc.get("tvm.relay.type_relation.Identity")
  
      attr1 = tvm.ir.make_node(
          "attrs.TestAttrs", name="attr", padding=(3, 4)
      )
      attr1_same = tvm.ir.make_node(
          "attrs.TestAttrs", name="attr", padding=(3, 4)
      )
      attr2 = tvm.ir.make_node(
          "attrs.TestAttrs", name="attr", padding=(3, 4, 4)
      )
  
      tr = relay.TypeRelation(
          broadcast, tvm.runtime.convert([t1, t2]), 1, attr1
      )
      same = relay.TypeRelation(
          broadcast, tvm.runtime.convert([t1, t2]), 1, attr1
      )
      diff_func = relay.TypeRelation(
          identity, tvm.runtime.convert([t1, t2]), 1, attr1
      )
      diff_order = relay.TypeRelation(
          broadcast, tvm.runtime.convert([t2, t1]), 1, attr1
      )
      diff_args = relay.TypeRelation(
          broadcast, tvm.runtime.convert([t2, t3]), 1, attr1
      )
      diff_attr = relay.TypeRelation(
          broadcast, tvm.runtime.convert([t1, t2]), 1, attr2
      )
      same_attr = relay.TypeRelation(
          broadcast, tvm.runtime.convert([t1, t2]), 1, attr1_same
      )
  
      bigger = relay.TypeRelation(
          identity, tvm.runtime.convert([t1, t3, t2]), 2, attr1
      )
      diff_num_inputs = relay.TypeRelation(
          identity, tvm.runtime.convert([t1, t3, t2]), 1, attr2
      )
  
      # func, number of args, input count, and order should be the same
      assert tr == same
      assert tr != diff_func
      assert tr != diff_order
      assert tr != diff_args
      assert tr != diff_attr
      assert tr == same_attr
      assert tr != bigger
  
      assert bigger != diff_num_inputs
  
imports: import numpy
  import tvm
  import tvm.testing
  from tvm import relay
  from tvm.relay.testing import run_opt_pass
label_desc: Use image node_id 7 for calling a global function with example usage: test_type_relation_sequal() without return types