code: def create_server(handler, host, port, client_timeout=90000):
      """
      Return a server object configured to listen on host/port and use the
      handler object to handle calls from clients. The handler object must have
      an interface compatible with the CugraphService service defined in the
      Thrift specification.
  
      Note: This function is defined here in order to allow it to have easy
      access to the Thrift spec loaded here on import, and to keep all thriftpy2
      calls in this module. However, this function is likely only called from the
      cugraph_service_server package which depends on the code in this package.
      """
      proto_factory = TBinaryProtocolFactory()
      trans_factory = TBufferedTransportFactory()
      client_timeout = client_timeout
  
      processor = TProcessor(spec.CugraphService, handler)
      server_socket = TServerSocket(
          host=host, port=port, client_timeout=client_timeout
      )
      server = TSimpleServer(
          processor,
          server_socket,
          iprot_factory=proto_factory,
          itrans_factory=trans_factory,
      )
      return server
  
file_path: cugraph/python/cugraph-service/client/cugraph_service_client/cugraph_service_thrift.py
imports: import io
  import thriftpy2
  from thriftpy2.rpc import make_client
  from thriftpy2.protocol import TBinaryProtocolFactory
  from thriftpy2.server import TSimpleServer
  from thriftpy2.thrift import TProcessor
  from thriftpy2.transport import TBufferedTransportFactory, TServerSocket, TTransportException
label_desc: Use image node_id 1 for calling a global function with example usage: create_server(handler, host, port, client_timeout) and returns: server