def get_history(instance):
    """Get the latest history entry of an instance."""
    try:
        history = {'id': str(instance.history.latest('pk').pk), 'class':
            instance.history.model.__name__}
    except:
        history = None
    return history
