Added `deep sorting` for dealing with variable shape `Objects`