code: def _create_server(
      shell,
      server_address,
      port,
      cert_file=None,
      key_file=None,
      key_password=None,
      ca_file=None,
  ):
      
      # Set up the request handler creator
      active_flag = SharedBoolean(True)
  
      def request_handler(*rh_args):
          """
          Constructs a RemoteConsole as TCP request handler
          """
          return RemoteConsole(shell, active_flag, *rh_args)
  
      # Set up the server
      server = ThreadingTCPServerFamily(
          (server_address, port),
          request_handler,
          cert_file,
          key_file,
          key_password,
          ca_file,
      )
  
      # Set flags
      server.daemon_threads = True
      server.allow_reuse_address = True
  
      # Activate the server
      server.server_bind()
      server.server_activate()
  
      # Serve clients
      server_thread = threading.Thread(
          target=server.serve_forever, name="RemoteShell-{0}".format(port)
      )
      server_thread.daemon = True
      server_thread.start()
  
      return server_thread, server, active_flag
docs: Creates the TCP console on the given address and port
  
      :param shell: The remote shell handler
      :param server_address: Server bound address
      :param port: Server port
      :param cert_file: Path to the server certificate
      :param key_file: Path to the server private key
      :param key_password: Password for the key file
      :param ca_file: Path to Certificate Authority to authenticate clients
      :return: A tuple: Server thread, TCP server object, Server active flag