def get_scope(request):
    """
    Utility method to return the scope of a pytest request
    :param request:
    :return:
    """
    if request.node is request.session:
        return 'session'
    elif hasattr(request.node, 'function'):
        return 'function'
    else:
        return 'module'