code: def main() -> None:
      parser = argparse.ArgumentParser(
          description="Format files with ufmt (black + usort).",
          fromfile_prefix_chars="@",
      )
      parser.add_argument(
          "--verbose",
          action="store_true",
          help="verbose logging",
      )
      parser.add_argument(
          "filenames",
          nargs="+",
          help="paths to lint",
      )
      args = parser.parse_args()
  
      logging.basicConfig(
          format="<%(threadName)s:%(levelname)s> %(message)s",
          level=logging.NOTSET
          if args.verbose
          else logging.DEBUG
          if len(args.filenames) < 1000
          else logging.INFO,
          stream=sys.stderr,
      )
  
      with concurrent.futures.ThreadPoolExecutor(
          max_workers=os.cpu_count(),
          thread_name_prefix="Thread",
      ) as executor:
          futures = {
              executor.submit(check_file, x): x for x in args.filenames
          }
          for future in concurrent.futures.as_completed(futures):
              try:
                  for lint_message in future.result():
                      print(
                          json.dumps(lint_message._asdict()), flush=True
                      )
              except Exception:
                  logging.critical('Failed at "%s".', futures[future])
                  raise
  
imports: import argparse
  import concurrent.futures
  import json
  import logging
  import os
  import sys
  from enum import Enum
  from pathlib import Path
  from typing import Any, List, NamedTuple, Optional
  from ufmt.core import make_black_config, ufmt_string
  from usort import Config
label_desc: Use image node_id 5 for calling a global function with example usage: main() without return types