text: from xmlrpc.server import SimpleXMLRPCServer
  from xmlrpc.server import SimpleXMLRPCRequestHandler
  
  
  # Restrict to a particular path.
  class RequestHandler(SimpleXMLRPCRequestHandler):
      rpc_paths = ('/RPC2',)
  
  
  class RegisteredFunctions:
      @staticmethod
      def function(num1, num2):
          result = float(num1) + float(num2)
          return result
  
  
  def main():
      # Create server
      server = SimpleXMLRPCServer(("localhost", 9001),
                                  requestHandler=RequestHandler)
      server.register_introspection_functions()
  
      server.register_instance(RegisteredFunctions())
  
      # Run the server's main loop
      server.serve_forever()
  
  
  if __name__ == '__main__':
      main()
  