code: def _read_from_seg(self, n):
      
      result = self._seg.read(size=n)
      if result == "":
        return result
      offset = self._seg.tell()
      if offset > self._seg_valid_length:
        extra = offset - self._seg_valid_length
        result = result[:-1*extra]
      self._offset += len(result)
      return result
docs: Read from current seg.
  
      Args:
        n: max number of bytes to read.
  
      Returns:
        valid bytes from the current seg. "" if no more is left.