'Remove unreferenced instances cached in the identity map.
Note that this method is only meaningful if "weak_identity_map" is set
to False.  The default weak identity map is self-pruning.
Removes any object in this Session\'s identity map that is not
referenced in user code, modified, new or scheduled for deletion.
Returns the number of objects pruned.'

@util.deprecated('0.7', 'The    non-weak-referencing    identity    map    feature    is    no    longer    needed.')
def prune(self):

    return self.identity_map.prune()
