def above(self, ref):
if not self._valid_ordering_reference(ref):<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>" % (<EOL>self, self.__class__, self.order_with_respect_to,<EOL>self._get_order_with_respect_to()<EOL>)<EOL>)<EOL><DEDENT>if self.order == ref.order:<EOL><INDENT>return<EOL><DEDENT>if self.order > ref.order:<EOL><INDENT>o = ref.order<EOL><DEDENT>else:<EOL><INDENT>o = self.get_ordering_queryset().filter(order__lt=ref.order).aggregate(Max('<STR_LIT>')).get('<STR_LIT>') or <NUM_LIT:0><EOL><DEDENT>self.to(o)<EOL>
Move this object above the referenced object.