def _closed(sock):
    try:
        rd, _, _ = select([sock], [], [], 0)
    # Any exception here is equally bad (select.error, ValueError, etc.).
    except:
        return True
    return len(rd) > 0
Tests, that get_all_permissions looks in the permissions of the group with
dataset/ETHPy150Open blynch/CloudMemeBackend/pymongo/pool.py/_closed--crossover with--dataset/ETHPy150Open OpenSlides/OpenSlides/tests/unit/users/test_auth.py/TestAnonymousUser.test_get_all_permissions_from_group_1