code: def read(self, size):
          
          data = None
          while True:
              try:
                  data = self.handle.recv(size)
              except socket.timeout as socket_error:
                  self._reconnect(socket_error)
              except socket.error as socket_error:
                  # this is fine, just retry
                  if socket_error.errno == errno.EINTR:
                      continue
                  self._reconnect(IOError)
              if not data:
                  self._reconnect(IOError)
              break
          return data
docs: Read wrapper.
  
          Parameters
          ----------
          size : int
            Number of bytes to read