def define_service(service_descriptor, module):
  class_dict = {'__module__': module.__name__}
  class_name = service_descriptor.name.encode('utf-8')

  for method_descriptor in service_descriptor.methods or []:
    request_definition = messages.find_definition(
        method_descriptor.request_type, module)
    response_definition = messages.find_definition(
        method_descriptor.response_type, module)

    method_name = method_descriptor.name.encode('utf-8')
    def remote_method(self, request):
      """Actual service method."""
      raise NotImplementedError('Method is not implemented')
    remote_method.__name__ = method_name
    remote_method_decorator = remote.method(request_definition,
                                            response_definition)

    class_dict[method_name] = remote_method_decorator(remote_method)

  service_class = type(class_name, (remote.Service,), class_dict)
  return service_class
Returns a list of all of the intersections of self with o.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/definition.py/define_service--crossover with--dataset/ETHPy150Open sympy/sympy/sympy/geometry/entity.py/GeometryEntity.intersection