code: def main():
      parser = argparse.ArgumentParser()
  
      parser.add_argument(
          "-v",
          "--version",
          action="version",
          version=pkg_resources.require("advisor")[0].version,
          help="Display sdk version",
      )
  
      main_subparser = parser.add_subparsers(
          dest="command_group", help="Commands"
      )
  
      # subcommand: study
      server_parser = main_subparser.add_parser(
          "server", help="Commands about server"
      )
      server_subparser = server_parser.add_subparsers(
          dest="server_command", help="Subcommands of server"
      )
  
      # subcommand: server start
      server_start_parser = server_subparser.add_parser(
          "start", help="Commands about server start"
      )
      server_start_parser.add_argument(
          "-p",
          "--port",
          dest="port",
          nargs="?",
          const=8000,
          default=8000,
          type=int,
          help="The port",
          required=False,
      )
  
      server_start_parser.add_argument(
          "-y",
          dest="server_start_noprompt",
          default=False,
          action="store_const",
          const=True,
          help="Answer yes to the start server prompt. Useful for daemonizing the server.",
      )
  
      server_start_parser.add_argument(
          "--command_args",
          dest="command_args",
          help="The extrs command args",
          required=False,
      )
      server_start_parser.set_defaults(func=start_server)
  
      # subcommand: server stop
      server_stop_parser = server_subparser.add_parser(
          "stop", help="Commands about server stop"
      )
      server_stop_parser.set_defaults(func=stop_server)
  
      # subcommand: server status
      server_status_parser = server_subparser.add_parser(
          "status", help="Commands about server status"
      )
      server_status_parser.set_defaults(func=check_server_status)
  
      # Display help information by default
      if len(sys.argv) == 1:
          args = parser.parse_args(["-h"])
      else:
          args = parser.parse_args(sys.argv[1:])
      args.func(args)
  
file_path: advisor/advisor_client/advisor_client/commandline/admin_command.py
imports: import argcomplete
  import argparse
  import logging
  import pkg_resources
  import sys
  import subprocess
label_desc: Use image node_id 5 for calling a global function with example usage: main() without return types