import socket


def socket_is_closed(sock: socket.socket) -> bool:
    """
    Checks if a socket is closed.

    Parameters
    ----------
    sock: :class:`socket.socket`
        The socket to check.
    """
    return sock.fileno() == -1