code: def get_size(self):
      
      if not self._is_open:
        raise IOError('Not opened.')
  
      if not hasattr(self._file_object, 'get_size'):
        if not self._size:
          current_offset = self.get_offset()
          self.seek(0, os.SEEK_END)
          self._size = self.get_offset()
          self.seek(current_offset, os.SEEK_SET)
        return self._size
  
      return self._file_object.get_size()
docs: Retrieves the size of the file-like object.
  
      Returns:
        int: size of the file-like object data.
  
      Raises:
        IOError: if the file-like object has not been opened.
        OSError: if the file-like object has not been opened.