code: def can_revert(self):
          
  
          if self.can_publish:
              with self.published_context():
                  return self.count(Q._uid == self._uid) > 0
  
          return False
docs: Return True if we can revert the draft version of the document to the
          currently published version.