def group_and_bridge(kwargs):

    bridge = kwargs.pop("bridge", None)

    if bridge:
        try:
            group = bridge.get_group(**kwargs)
        except ObjectDoesNotExist:
            raise Http404
    else:
        group = None

    return group, bridge
Given kwargs from the view (with view specific keys popped) pull out the
dataset/ETHPy150Open amarandon/smeuhsocial/apps/account/views.py/group_and_bridge