<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_server(self, loop=None, as_coroutine=False, protocol_factory=None, **server_config):
 """ Helper function which constructs a listening server, using the default growler.http.protocol.Protocol which responds to this app. This function exists only to remove boilerplate code for starting up a growler app when using asyncio. Args: as_coroutine (bool):
 If True, this function does not wait for the server to be created, and only returns the coroutine generator object returned by loop.create_server. This mode should be used when already inside an async function. The default mode is to call :method:`run_until_complete` on the loop paramter, blocking until the server is created and added to the event loop. server_config (mixed):
 These keyword arguments parameters are passed directly to the BaseEventLoop.create_server function. Consult their documentation for details. loop (BaseEventLoop):
 This is the asyncio event loop used to provide the underlying `create_server` method, and, if as_coroutine is False, will block until the server is created. protocol_factory (callable):
 Function returning an asyncio protocol object (or more specifically, a `growler.aio.GrowlerProtocol` object) to be called upon client connection. The default is the :class:`GrowlerHttpProtocol` factory function. **server_config (mixed):
 These keyword arguments parameters are passed directly to the BaseEventLoop.create_server function. Consult their documentation for details. Returns: asyncio.Server: The result of asyncio.BaseEventLoop.create_server which has been passed to the event loop and setup with the provided parameters. This is returned if gen_coroutine is False (default). asyncio.coroutine: An asyncio.coroutine which will produce the asyncio.Server from the provided configuration parameters. This is returned if gen_coroutine is True. """

        if loop is None:
            import asyncio
            loop = asyncio.get_event_loop()

        if protocol_factory is None:
            from growler.aio import GrowlerHTTPProtocol
            protocol_factory = GrowlerHTTPProtocol.get_factory

        create_server = loop.create_server(
            protocol_factory(self, loop=loop),
            **server_config
        )

        if as_coroutine:
            return create_server
        else:
            return loop.run_until_complete(create_server)