def status_description(library, session, status):
    """Returns a user-readable description of the status code passed to the operation.

    Corresponds to viStatusDesc function of the VISA library.

    :param library: the visa library wrapped by ctypes.
    :param session: Unique logical identifier to a session.
    :param status: Status code to interpret.
    :return: - The user-readable string interpretation of the status code passed to the operation,
             - return value of the library call.
    :rtype: - unicode (Py2) or str (Py3)
            - :class:`pyvisa.constants.StatusCode`
    """
    description = create_string_buffer(256)
    ret = library.viStatusDesc(session, status, description)
    return buffer_to_text(description), ret
Returns a user-readable description of the status code passed to the operation.

    Corresponds to viStatusDesc function of the VISA library.

    :param library: the visa library wrapped by ctypes.
    :param session: Unique logical identifier to a session.
    :param status: Status code to interpret.
    :return: - The user-readable string interpretation of the status code passed to the operation,
             - return value of the library call.
    :rtype: - unicode (Py2) or str (Py3)
            - :class:`pyvisa.constants.StatusCode`