code: def main():
      argparser = argparse.ArgumentParser(
          description="CARLA map spawn points extractor"
      )
      argparser.add_argument(
          "--host",
          metavar="H",
          default="127.0.0.1",
          help="IP of the host server (default: 127.0.0.1)",
      )
      argparser.add_argument(
          "-p",
          "--port",
          metavar="P",
          default=2000,
          type=int,
          help="TCP port to listen to (default: 2000)",
      )
      argparser.add_argument(
          "-o",
          "--output-dir",
          required=True,
          help="Output directory path for extraction result",
      )
      args = argparser.parse_args()
  
      if args.output_dir is None or not os.path.exists(args.output_dir):
          print("output directory not found.")
  
      logging.basicConfig(
          format="%(levelname)s: %(message)s", level=logging.INFO
      )
  
      logging.info("listening to server %s:%s", args.host, args.port)
  
      print(__doc__)
  
      try:
          extract(args)
      except:
          print("\nAn error has occurred in extraction.")
  
file_path: carla/PythonAPI/util/extract_spawn_points.py
imports: from __future__ import print_function
  import argparse
  import logging
  import glob
  import os
  import sys
  import carla
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types