<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gpib_command(library, session, data):
 """Write GPIB command bytes on the bus. Corresponds to viGpibCommand function of the VISA library. :param library: the visa library wrapped by ctypes. :param session: Unique logical identifier to a session. :param data: data tor write. :type data: bytes :return: Number of written bytes, return value of the library call. :rtype: int, :class:`pyvisa.constants.StatusCode` """

    return_count = ViUInt32()

    # [ViSession, ViBuf, ViUInt32, ViPUInt32]
    ret = library.viGpibCommand(session, data, len(data), byref(return_count))
    return return_count.value, ret