code: def read(self, size=None):
          
          blob = self.s.read(size)
          if size is not None and len(blob) < size:
              raise EOFError
          if self._captured:
              self._captured.write(blob)
          return blob
docs: Read `size` bytes from stream.