def revert_to_revision(self, revision):
revision_id = obj_or_id(revision, "<STR_LIT>", (PageRevision,))<EOL>response = self._requester.request(<EOL>'<STR_LIT:POST>',<EOL>'<STR_LIT>'.format(<EOL>self.parent_type,<EOL>self.parent_id,<EOL>self.url,<EOL>revision_id<EOL>),<EOL>)<EOL>pagerev_json = response.json()<EOL>if self.parent_type == "<STR_LIT>":<EOL><INDENT>pagerev_json.update({'<STR_LIT>': self.id})<EOL><DEDENT>elif self.parent_type == "<STR_LIT>":<EOL><INDENT>pagerev_json.update({'<STR_LIT>': self.id})<EOL><DEDENT>return PageRevision(self._requester, pagerev_json)<EOL>
Revert the page back to a specified revision.

:calls: `POST /api/v1/courses/:course_id/pages/:url/revisions/:revision_id \
<https://canvas.instructure.com/doc/api/pages.html#method.wiki_pages_api.revert>`_

:param revision: The object or ID of a specified revision.
:type revision: :class:`canvasapi.pagerevision.PageRevision` or int

:returns: Contents of the page revision.
:rtype: :class:`canvasapi.pagerevision.PageRevision`