def is_closed(socket_):
    """Determine if a socket is closed.

    This uses the associated file descriptor as a proxy for "closed".

    Args:
        socket_ (socket.socket): The socket to check.

    Returns:
        bool: Indicates if closed or open.
    """
    return socket_.fileno() == -1
