code: def is_output_correct(
      output: torch.Tensor, expected: torch.Tensor
  ) -> bool:
      """
      Check whether the output is correct.
      """
      comparison_metric = ARGS.result_metric
      if comparison_metric == ResultComparisonMetric.COSINE:
          return same(expected, output, cosine_similarity=True)
      elif comparison_metric == ResultComparisonMetric.ALLCLOSE:
          return same(expected, output, tol=1e-4)
      else:
          raise RuntimeError(
              f"Unknown comparison metric {comparison_metric}"
          )
  
imports: import argparse
  import contextlib
  import logging
  import os
  import pickle
  import sys
  import warnings
  from collections import defaultdict
  from enum import Enum
  from typing import Callable, Dict, List, Tuple
  import numpy
  import torch
  from scipy.stats import ttest_ind
  import tvm
  import tvm.relay
  from tvm import meta_schedule
  from tvm._ffi import get_global_func
  from tvm.contrib.graph_executor import GraphModule
  from tvm.meta_schedule.testing.torchbench.utils import DisallowedOperator, load_torchdynamo_benchmark_runner, same, timed
  from tvm.runtime.vm import VirtualMachine
  from tvm.support import describe
  import torchdynamo
label_desc: Use image node_id 9 for calling a global function with example usage: is_output_correct(output, expected) and returns: same, same