Rather than setting these as separate lines, why not this?


    response_data = {
        'uri': request.path,
        'from_group_id': group_id,
        'to_group_id': related_group_id,
    }