'Mptt specific stuff before the object can be saved, overrides
original publisher method.
Args:
obj - public variant of `self` to be saved.'

def _publisher_save_public(self, obj):

    if (self.parent_id and self.parent.publisher_public_id):
        public_parent = Page.objects.get(pk=self.parent.publisher_public_id)
    elif (not self.parent_id):
        obj.parent = None
        obj.save()
        obj = obj.move(self, pos='right')
        return obj
    else:
        public_parent = None
    obj.parent = public_parent
    obj.save()
    if (not public_parent):
        return obj
    left_sibling = self.get_previous_filtered_sibling(publisher_public__parent=public_parent)
    right_sibling = self.get_next_filtered_sibling(publisher_public__parent=public_parent)
    if left_sibling:
        left_public_sibling_pk = obj.get_left_sibling_pk()
        left_sibling_changed = (left_sibling.publisher_public_id != left_public_sibling_pk)
    else:
        left_sibling_changed = False
    if right_sibling:
        right_public_sibling_pk = obj.get_right_sibling_pk()
        right_sibling_changed = (right_sibling.publisher_public_id != right_public_sibling_pk)
    else:
        right_sibling_changed = False
    first_time_published = (not self.publisher_public_id)
    parent_change = (public_parent != obj.parent)
    tree_change = ((self.depth != obj.depth) or left_sibling_changed or right_sibling_changed)
    if (first_time_published or parent_change or tree_change):
        if left_sibling:
            obj = obj.move(left_sibling.publisher_public, pos='right')
        elif right_sibling:
            obj = obj.move(right_sibling.publisher_public, pos='left')
        else:
            obj = obj.move(target=public_parent, pos='first-child')
    return obj
