code: def check_result(
      pattern_table, graph, expected_graph, import_prelude=False
  ):
      """Utility function to check merge composite results."""
      result = run_opt_pass(
          graph,
          relay.transform.MergeComposite(pattern_table),
          import_prelude=import_prelude,
      )
      assert not relay.analysis.free_vars(
          result
      ), "Found free vars in the result graph: {0}".format(str(result))
      expected = run_opt_pass(
          expected_graph, relay.transform.InferType()
      )
      assert tvm.ir.structural_equal(
          result, expected, map_free_vars=True
      ), "Graph mismatch: output vs. expected\n{0}\n=====\n{1}".format(
          str(result), str(expected)
      )
  
imports: import pytest
  import tvm
  from tvm import relay, tir
  from tvm.relay.dataflow_pattern import TuplePattern, TupleGetItemPattern, is_op, wildcard
  from tvm.relay.testing import run_opt_pass
label_desc: Use image node_id 7 for calling a global function with example usage: check_result(pattern_table, graph, expected_graph, import_prelude) without return types