nodes: 0, module; 1, function_definition; 2, function_name:previous; 3, parameters; 4, block; 5, identifier:self; 6, expression_statement; 7, if_statement; 8, if_statement; 9, return_statement; 10, comment:""" Gets the previous page, respecting sort order """; 11, comparison_operator:self._order_by == 'oldest'; 12, block; 13, comparison_operator:self._order_by == 'newest'; 14, block; 15, None; 16, attribute; 17, string; 18, return_statement; 19, attribute; 20, string; 21, return_statement; 22, identifier:self; 23, identifier:_order_by; 24, string_content:oldest; 25, attribute; 26, identifier:self; 27, identifier:_order_by; 28, string_content:newest; 29, attribute; 30, identifier:self; 31, identifier:older; 32, identifier:self; 33, identifier:newer
code: def previous(self):
          """ Gets the previous page, respecting sort order """
          if self._order_by == 'oldest':
              return self.older
          if self._order_by == 'newest':
              return self.newer
          return None