code: def main(cls):
      parser = argparse.ArgumentParser("python -m examples.performance")
  
      if cls.name is None:
          parser.add_argument(
              "name", choices=cls._suite_names(), help="suite to run"
          )
  
          if len(sys.argv) > 1:
              potential_name = sys.argv[1]
              try:
                  __import__(__name__ + "." + potential_name)
              except ImportError:
                  pass
  
      parser.add_argument(
          "--test", nargs="+", type=str, help="run specific test(s)"
      )
  
      parser.add_argument(
          "--dburl",
          type=str,
          default="sqlite:///profile.db",
          help="database URL, default sqlite:///profile.db",
      )
      parser.add_argument(
          "--num",
          type=int,
          default=cls.num,
          help="Number of iterations/items/etc for tests; "
          "default is %d module-specific" % cls.num,
      )
      parser.add_argument(
          "--profile",
          action="store_true",
          help="run profiling and dump call counts",
      )
      parser.add_argument(
          "--sort",
          type=str,
          default="cumulative",
          help="profiling sort, defaults to cumulative",
      )
      parser.add_argument(
          "--dump",
          action="store_true",
          help="dump full call profile (implies --profile)",
      )
      parser.add_argument(
          "--raw",
          type=str,
          help="dump raw profile data to file (implies --profile)",
      )
      parser.add_argument(
          "--callers",
          action="store_true",
          help="print callers as well (implies --dump)",
      )
      parser.add_argument(
          "--gc", action="store_true", help="turn on GC debug stats"
      )
      parser.add_argument(
          "--echo", action="store_true", help="Echo SQL output"
      )
      args = parser.parse_args()
  
      args.dump = args.dump or args.callers
      args.profile = args.profile or args.dump or args.raw
  
      if cls.name is None:
          __import__(__name__ + "." + args.name)
  
      Profiler(args).run()
  
imports: import argparse
  import cProfile
  import gc
  import os
  import pstats
  import re
  import sys
  import time
label_desc: Use image node_id 10 for calling the Profiler obj's underlying member method code with example usage: obj.main(cls) without return types