code: def main(args: argparse.Namespace) -> None:
      test_runner_kwargs = {"verbosity": 2}
      Runner = unittest.TextTestRunner
  
      xml_dir = None
      if (args.xml_report is not None) or (args.xml_dir is not None):
          if args.xml_report is not None:
              import warnings
  
              warnings.warn(
                  "The option of `--xml-report` is deprecated",
                  FutureWarning,
              )
  
          import xmlrunner
          from datetime import date  # NOQA
  
          Runner = xmlrunner.XMLTestRunner
          if args.xml_report:
              xml_dir = os.path.abspath(os.path.dirname(__file__))
          else:
              xml_dir = os.path.abspath(args.xml_dir)
          if not os.path.exists(xml_dir):
              os.makedirs(xml_dir)
  
      errcode = 0
      for test_dir in args.include:
          if xml_dir is not None:
              xml_output = os.path.join(
                  xml_dir,
                  f"""TEST_{test_dir}_{date.today().strftime("%y%m%d")}""",
              )
              if not os.path.exists(xml_output):
                  os.makedirs(xml_output)
              test_runner_kwargs["output"] = xml_output
  
          runner = Runner(**test_runner_kwargs)
          test_dir = os.path.join(TEST_ROOT, test_dir)
          suite = unittest.TestLoader().discover(test_dir)
  
          print("\nExecuting tests from " + test_dir)
  
          result = runner.run(suite)
  
          if not result.wasSuccessful():
              errcode = 1
  
      sys.exit(errcode)
  
imports: import argparse
  import os
  import unittest
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: main(args) without return types