@staticmethod
def _sort_db_actions(db_actions):
    """Sort ActiveAction items by two fields

        score - primary, ascending
        created_at - secondary, descending
        """
    return sorted(db_actions, key=lambda action: (-action.score, action.
        created_at), reverse=False)
