def yaml(self):
        return yaml.dump(self.serialized, default_flow_style=False,
                         encoding=None)
def reorder_item(self, item, position):
    new_position = min(max(position, 0), len(self._items) - 1)