def cmp_policy_info(info, remote_info):
    def is_deleted(info):
        return (info['delete_timestamp'] > info['put_timestamp'] and
                info.get('count', info.get('object_count', 0)) == 0)

    deleted = is_deleted(info)
    remote_deleted = is_deleted(remote_info)
    if any([deleted, remote_deleted]):
        if not deleted:
            return -1
        elif not remote_deleted:
            return 1
        return cmp(remote_info['status_changed_at'],
                   info['status_changed_at'])

    def has_been_recreated(info):
        return (info['put_timestamp'] > info['delete_timestamp'] >
                Timestamp(0))

    remote_recreated = has_been_recreated(remote_info)
    recreated = has_been_recreated(info)
    if any([remote_recreated, recreated]):
        if not recreated:
            return 1
        elif not remote_recreated:
            return -1
        return cmp(remote_info['status_changed_at'],
                   info['status_changed_at'])
    return cmp(info['status_changed_at'], remote_info['status_changed_at'])
Creates all the menu commands that create nodes from all the dag node
dataset/ETHPy150Open openstack/swift/swift/container/reconciler.py/cmp_policy_info--crossover with--dataset/ETHPy150Open andrew-gardner/dependsworkflow/depends/depends_main_window.py/MainWindow.createCreateMenuActions