def METHOD_NAME():
    """
    Get a free port.
    Returns
    -------
    port : int
        a free port
    """
    with contextlib.closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as _socket:
        _socket.bind(('', 0))
        _, port = _socket.getsockname()
        return port