code: def _read(self, size):
          
          data = ''
          while len(data) < size:
              try:
                  chunk = self.socket.recv(size-len(data))
              except socket.error as (err, msg):
                  self.connected = False
                  raise ScratchError("[Errno %d] %s" % (err, msg))
              if chunk == '':
                  self.connected = False
                  raise ScratchConnectionError("Connection broken")
              data += chunk
          return data
docs: Reads size number of bytes from Scratch and returns data as a string