def group_and_bridge(kwargs):
bridge = kwargs.pop("<STR_LIT>", None)<EOL>if bridge:<EOL><INDENT>try:<EOL><INDENT>group = bridge.get_group(**kwargs)<EOL><DEDENT>except ObjectDoesNotExist:<EOL><INDENT>raise Http404<EOL><DEDENT><DEDENT>else:<EOL><INDENT>group = None<EOL><DEDENT>return group, bridge<EOL>
Given kwargs from the view (with view specific keys popped) pull out the
bridge and fetch group from database.