def METHOD_NAME():
    # pick a free port with bind to 0 - without SO_REUSEPORT
    # then close it and try to bind to same port with SO_REUSEPORT
    # loop helps in case something else used the chosen port before second bind
    addr = None
    errors = []
    for _ in range(5):
        lsock1 = eventlet.listen(('localhost', 0))
        addr = lsock1.getsockname()
        lsock1.close()
        try:
            lsock1 = eventlet.listen(addr)
        except socket.error as e:
            errors.append(e)
            continue
        break
    else:
        assert False, errors
    if hasattr(socket, 'SO_REUSEPORT'):
        lsock2 = eventlet.listen(addr)
    else:
        try:
            lsock2 = eventlet.listen(addr)
            assert lsock2
            lsock2.close()
        except socket.error:
            pass
    lsock1.close()