code: def write_asynchronously(library, session, data):
      
      job_id = ViJobId()
      # [ViSession, ViBuf, ViUInt32, ViPJobId]
      ret = library.viWriteAsync(session, data, len(data), byref(job_id))
      return job_id, ret
docs: Writes data to device or interface asynchronously.
  
      Corresponds to viWriteAsync function of the VISA library.
  
      :param library: the visa library wrapped by ctypes.
      :param session: Unique logical identifier to a session.
      :param data: data to be written.
      :return: Job ID of this asynchronous write operation, return value of the library call.
      :rtype: jobid, :class:`pyvisa.constants.StatusCode`