code: def test_function_sequal():
      tt1 = relay.TensorType((1, 2, 3), "float32")
      tt2 = relay.TensorType((4, 5, 6), "int8")
      tt3 = relay.TupleType([tt1, tt2])
  
      v1 = relay.Var("v1", tt1)
      v2 = relay.Var("v2", tt2)
      v3 = relay.Var("v3", tt3)
      v4 = relay.Var("v4", tt2)
      vret = relay.Constant(tvm.nd.array(np.ones(1)))
  
      tp1 = relay.TypeVar("tp1", relay.TypeKind.Type)
      tp2 = relay.TypeVar("tp2", relay.TypeKind.Type)
      tp3 = relay.TypeVar("tp3", relay.TypeKind.ShapeVar)
      tp4 = relay.TypeVar("tp4", relay.TypeKind.ShapeVar)
  
      basic_args = [relay.Var("v3", tt1), relay.Var("v4", tt2)]
      basic_tps = [tp1, tp2]
  
      func = relay.Function([v1, v2], v1, tt2, basic_tps)
      mapped = relay.Function(basic_args, basic_args[0], tt2, basic_tps)
      assert consistent_equal(func, mapped)
  
      fewer_params = relay.Function(
          [relay.Var("v4", tt2)], v4, tt2, basic_tps
      )
      assert not consistent_equal(func, fewer_params)
  
      more_params = relay.Function(
          [
              relay.Var("v3", tt1),
              relay.Var("v4", tt2),
              relay.Var("v2", tt2),
          ],
          v4,
          tt2,
          basic_tps,
      )
      assert not consistent_equal(func, more_params)
  
      params_unordered = relay.Function([v2, v1], v1, tt2, basic_tps)
      assert not consistent_equal(func, params_unordered)
  
      params_mismatch = relay.Function([v1, v3], v1, tt2, basic_tps)
      assert not consistent_equal(func, params_mismatch)
  
      # also would not typecheck
      ret_type_mismatch = relay.Function(basic_args, v4, tt1, basic_tps)
      assert not consistent_equal(func, ret_type_mismatch)
  
      # also mis-typed
      different_body = relay.Function(basic_args, v3, tt2, basic_tps)
      assert not consistent_equal(func, different_body)
  
      fewer_type_params = relay.Function(basic_args, v4, tt2, [tp1])
      assert not consistent_equal(func, fewer_type_params)
  
      more_type_params = relay.Function(
          basic_args, v4, tt2, [tp1, tp2, tp3]
      )
      assert not consistent_equal(func, more_type_params)
  
      type_params_unordered = relay.Function(
          basic_args, v4, tt2, [tp2, tp1]
      )
      assert not consistent_equal(func, type_params_unordered)
  
      different_type_params = relay.Function(
          basic_args, v4, tt2, [tp3, tp4]
      )
      assert not consistent_equal(func, different_type_params)
  
      # a well-typed example that also differs in body, ret type, and type params
      tupled_example = relay.Function(
          basic_args, relay.Tuple([v3, v4]), tt3
      )
      assert not consistent_equal(func, tupled_example)
  
      # nullable
      no_ret_type = relay.Function(basic_args, v4, None, [tp1, tp2])
      # both null
      assert consistent_equal(no_ret_type, no_ret_type)
      # one null
      assert not consistent_equal(func, no_ret_type)
      assert not consistent_equal(no_ret_type, func)
  
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 18 for calling a global function with example usage: test_function_sequal() without return types