@staticmethod
def sorter(elements, reverse=False):
    """
        yield model instances in primary key order

        :param Manager.instances elements: our instances
        :param kw:
            * reverse: return in reverse order
        :rtype: ``generator``
        """
    for key in sorted(elements.keys(), reverse=reverse):
        yield elements[key]
