code: def print_with_counter_func(counter: int, total: int) -> Callable:
      """Print with counter
  
      Parameters
      ----------
      counter : int
          The counter to print with.
      total : int
          The total number of items to print with.
  
      Returns
      -------
      print_result : Callable
          The print result function.
      """
  
      def print_result(
          result: str,
          *,
          original_mod: IRModule = None,
          scheduled_mod: IRModule = None,
          inputs: List[np.ndarray] = None,
          original_res: List[np.ndarray] = None,
          scheduled_res: List[np.ndarray] = None,
          original_run_secs: List[float] = None,
          scheduled_run_secs: List[float] = None,
          exception: Exception = None,
          trace: str = None,
      ) -> None:
          """Print the validation result."""
          status = f"Progress {counter: 6d} / {total: 6d} (estimated) checked, result: {result:>10}, "
  
          if result in ["pass", "wrong answer"]:
              status += (
                  f"original: {mean(original_run_secs) * 1e3: 10.3f} ms, "
                  f"scheduled: {mean(scheduled_run_secs) * 1e3: 10.3f} ms"
              )
  
          output = [status]
          if result not in ["pass", "skip"]:
              output.extend(
                  [
                      "Original IRModule:"
                      + DELIMITOR
                      + original_mod.script(),
                      "Scheduled IRModule:"
                      + DELIMITOR
                      + scheduled_mod.script(),
                      "Trace" + DELIMITOR + str(trace),
                  ]
              )
              if result == "wrong answer":
                  output.extend(
                      [
                          "Input:" + DELIMITOR + str(inputs),
                          "Original Result:"
                          + DELIMITOR
                          + str(original_res),
                          "Scheduled Result:"
                          + DELIMITOR
                          + str(scheduled_res),
                          "Max Diff:"
                          + DELIMITOR
                          + str(
                              [
                                  np.max(
                                      np.abs(
                                          original_res[i]
                                          - scheduled_res[i]
                                      )
                                  )
                                  for i in range(len(original_res))
                              ]
                          )
                          + "\n",
                      ]
                  )
              elif result == "exception":
                  output.extend(
                      ["Exception:" + DELIMITOR + str(exception) + "\n"]
                  )
              else:
                  raise ValueError(f"Unknown result: {result}")
          print("\n\n".join(output))
  
      return print_result
  
imports: import argparse
  import logging
  import warnings
  import itertools
  from statistics import mean
  from distutils.util import strtobool
  from typing import Callable, Tuple, Union, List, Any
  import numpy
  import tvm
  from tvm import meta_schedule
  from tvm._ffi import get_global_func, register_func
  from tvm.ir import IRModule
  from tvm.support import describe
  from tvm.target import Target
  from tvm.tir import Schedule
  from tvm.tir.schedule import Trace
  from tvm.meta_schedule.utils import remove_build_dir
  from tvm.meta_schedule.testing.tune_utils import generate_input_data
  from tvm.tir.tensor_intrin import *
label_desc: Use image node_id 10 for calling a global function with example usage: print_with_counter_func(counter, total) and returns: print_result