code: def read(self, n):
      
      if self._EOF:
        return ""
  
      while self._seg_index <= self._last_seg_index:
        result = self._read_from_seg(n)
        if result != "":
          return result
        else:
          self._next_seg()
  
      self._EOF = True
      return ""
docs: Read data from file segs.
  
      Args:
        n: max bytes to read. Must be positive.
  
      Returns:
        some bytes. May be smaller than n bytes. "" when no more data is left.