<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def view_as_consumer( wrapped_view: typing.Callable[[HttpRequest], HttpResponse], mapped_actions: typing.Optional[ typing.Dict[str, str] ]=None) -> Type[AsyncConsumer]: """ Wrap a django View so that it will be triggered by actions over this json websocket consumer. """

    if mapped_actions is None:
        mapped_actions = {
            'create': 'PUT',
            'update': 'PATCH',
            'list': 'GET',
            'retrieve': 'GET'
        }

    class DjangoViewWrapper(DjangoViewAsConsumer):
        view = wrapped_view
        actions = mapped_actions

    return DjangoViewWrapper