code: def main():
      usage = "usage: %prog [-h|--help] [options]"
      parser = OptionParser(usage=usage)
      parser.add_option(
          "-t",
          "--throughput",
          action="store_true",
          dest="throughput",
          default=False,
          help="run throughput tests",
      )
      parser.add_option(
          "-l",
          "--latency",
          action="store_true",
          dest="latency",
          default=False,
          help="run latency tests",
      )
      parser.add_option(
          "-b",
          "--bandwidth",
          action="store_true",
          dest="bandwidth",
          default=False,
          help="run I/O bandwidth tests",
      )
      parser.add_option(
          "-i",
          "--interval",
          action="store",
          type="int",
          dest="check_interval",
          default=None,
          help="sys.setcheckinterval() value " "(Python 3.8 and older)",
      )
      parser.add_option(
          "-I",
          "--switch-interval",
          action="store",
          type="float",
          dest="switch_interval",
          default=None,
          help="sys.setswitchinterval() value "
          "(Python 3.2 and newer)",
      )
      parser.add_option(
          "-n",
          "--num-threads",
          action="store",
          type="int",
          dest="nthreads",
          default=4,
          help="max number of threads in tests",
      )
  
      # Hidden option to run the pinging and bandwidth clients
      parser.add_option(
          "",
          "--latclient",
          action="store",
          dest="latclient",
          default=None,
          help=SUPPRESS_HELP,
      )
      parser.add_option(
          "",
          "--bwclient",
          action="store",
          dest="bwclient",
          default=None,
          help=SUPPRESS_HELP,
      )
  
      options, args = parser.parse_args()
      if args:
          parser.error("unexpected arguments")
  
      if options.latclient:
          kwargs = eval(options.latclient)
          latency_client(**kwargs)
          return
  
      if options.bwclient:
          kwargs = eval(options.bwclient)
          bandwidth_client(**kwargs)
          return
  
      if (
          not options.throughput
          and not options.latency
          and not options.bandwidth
      ):
          options.throughput = (
              options.latency
          ) = options.bandwidth = True
      if options.check_interval:
          sys.setcheckinterval(options.check_interval)
      if options.switch_interval:
          sys.setswitchinterval(options.switch_interval)
  
      print(
          "== %s %s (%s) =="
          % (
              platform.python_implementation(),
              platform.python_version(),
              platform.python_build()[0],
          )
      )
      # Processor identification often has repeated spaces
      cpu = " ".join(platform.processor().split())
      print(
          "== %s %s on '%s' =="
          % (
              platform.machine(),
              platform.system(),
              cpu,
          )
      )
      print()
  
      if options.throughput:
          print("--- Throughput ---")
          print()
          run_throughput_tests(options.nthreads)
  
      if options.latency:
          print("--- Latency ---")
          print()
          run_latency_tests(options.nthreads)
  
      if options.bandwidth:
          print("--- I/O bandwidth ---")
          print()
          run_bandwidth_tests(options.nthreads)
  
imports: from __future__ import division
  from __future__ import print_function
  import time
  import os
  import sys
  import itertools
  import threading
  import subprocess
  import socket
  from optparse import OptionParser, SUPPRESS_HELP
  import platform
label_desc: Use image node_id 19 for calling a global function with example usage: main() without return types