def assert_trigger(library, session, protocol):
    """Assert software or hardware trigger.

    Corresponds to viAssertTrigger function of the VISA library.

    Parameters
    ----------
    library : ctypes.WinDLL or ctypes.CDLL
        ctypes wrapped library.
    session : VISASession
        Unique logical identifier to a session.
    protocol : constants.TriggerProtocol
        Trigger protocol to use during assertion.

    Returns
    -------
    constants.StatusCode
        Return value of the library call.

    """
    return library.viAssertTrigger(session, protocol)