code: def read(self, session, count):
          
  
          try:
              sess = self.sessions[session]
          except KeyError:
              return b'', constants.StatusCode.error_invalid_object
  
          try:
              chunk, status = sess.read(count)
              if status == constants.StatusCode.error_timeout:
                  raise errors.VisaIOError(constants.VI_ERROR_TMO)
              return chunk, status
          except AttributeError:
              return b'', constants.StatusCode.error_nonsupported_operation
docs: Reads data from device or interface synchronously.
  
          Corresponds to viRead function of the VISA library.
  
          :param session: Unique logical identifier to a session.
          :param count: Number of bytes to be read.
          :return: data read, return value of the library call.
          :rtype: bytes, :class:`pyvisa.constants.StatusCode`