def _CreateService(payload_pb2, responses_pb2, service_pb2):
    """Provides a servicer backend and a stub.

  The servicer is just the implementation of the actual servicer passed to the
  face player of the python RPC implementation; the two are detached.

  Yields:
    A (servicer_methods, stub) pair where servicer_methods is the back-end of
      the service bound to the stub and stub is the stub on which to invoke
      RPCs.
  """
    servicer_methods = _ServicerMethods(payload_pb2, responses_pb2)

    class Servicer(getattr(service_pb2, SERVICER_IDENTIFIER)):

        def UnaryCall(self, request, context):
            return servicer_methods.UnaryCall(request, context)

        def StreamingOutputCall(self, request, context):
            return servicer_methods.StreamingOutputCall(request, context)

        def StreamingInputCall(self, request_iter, context):
            return servicer_methods.StreamingInputCall(request_iter, context)

        def FullDuplexCall(self, request_iter, context):
            return servicer_methods.FullDuplexCall(request_iter, context)

        def HalfDuplexCall(self, request_iter, context):
            return servicer_methods.HalfDuplexCall(request_iter, context)

    servicer = Servicer()
    server = getattr(service_pb2, SERVER_FACTORY_IDENTIFIER)(servicer)
    port = server.add_insecure_port('[::]:0')
    server.start()
    channel = implementations.insecure_channel('localhost', port)
    stub = getattr(service_pb2, STUB_FACTORY_IDENTIFIER)(channel)
    yield servicer_methods, stub
    server.stop(0)