code: def test_match_sequal():
      mod = tvm.IRModule()
      p = relay.prelude.Prelude(mod)
      _, cons, nil = p.mod.get_type("List")
      _, none, some = p.mod.get_type("Option")
  
      x = relay.Var("x")
      y = relay.Var("y")
      nil_case = relay.Clause(relay.PatternConstructor(nil), nil())
      cons_case = relay.Clause(
          relay.PatternConstructor(
              cons, [relay.PatternVar(x), relay.PatternVar(y)]
          ),
          cons(x, y),
      )
  
      z = relay.Var("z")
      a = relay.Var("a")
      equivalent_cons = relay.Clause(
          relay.PatternConstructor(
              cons, [relay.PatternVar(z), relay.PatternVar(a)]
          ),
          cons(z, a),
      )
  
      data = cons(relay.const(1), cons(relay.const(2), nil()))
  
      match = relay.Match(data, [nil_case, cons_case])
      equivalent = relay.Match(data, [nil_case, equivalent_cons])
      empty = relay.Match(data, [])
      no_cons = relay.Match(data, [nil_case])
      no_nil = relay.Match(data, [cons_case])
      different_data = relay.Match(nil(), [nil_case, cons_case])
      different_order = relay.Match(data, [cons_case, nil_case])
      different_nil = relay.Match(
          data,
          [
              relay.Clause(
                  relay.PatternConstructor(nil), cons(nil(), nil())
              ),
              cons_case,
          ],
      )
      different_cons = relay.Match(
          data,
          [
              nil_case,
              relay.Clause(
                  relay.PatternConstructor(
                      cons,
                      [
                          relay.PatternWildcard(),
                          relay.PatternWildcard(),
                      ],
                  ),
                  nil(),
              ),
          ],
      )
      another_case = relay.Match(
          data,
          [
              nil_case,
              cons_case,
              relay.Clause(relay.PatternWildcard(), nil()),
          ],
      )
      wrong_constructors = relay.Match(
          data,
          [
              relay.Clause(relay.PatternConstructor(none), nil()),
              relay.Clause(
                  relay.PatternConstructor(some, [relay.PatternVar(x)]),
                  cons(x, nil()),
              ),
          ],
      )
  
      tvm.ir.assert_structural_equal(match, match)
      assert consistent_equal(match, match)
      assert consistent_equal(match, equivalent)
      assert not consistent_equal(match, no_cons)
      assert not consistent_equal(match, no_nil)
      assert not consistent_equal(match, empty)
      assert not consistent_equal(match, different_data)
      assert not consistent_equal(match, different_order)
      assert not consistent_equal(match, different_nil)
      assert not consistent_equal(match, different_cons)
      assert not consistent_equal(match, another_case)
      assert not consistent_equal(match, wrong_constructors)
  
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 23 for calling a global function with example usage: test_match_sequal() without return types