code: def get_offset(self):
      
      if not self._is_open:
        raise IOError('Not opened.')
  
      if not hasattr(self._file_object, 'get_offset'):
        return self._file_object.tell()
      return self._file_object.get_offset()
docs: Retrieves the current offset into the file-like object.
  
      Returns:
        int: current offset into the file-like object.
  
      Raises:
        IOError: if the file-like object has not been opened.
        OSError: if the file-like object has not been opened.