Oooop, I replaced too much stuff :)
Add missing import.
Add cms.utils.aum.get_auth_model_name
Use LooseVersion instead of comparing tuples.
Take optional obj argument in get_inline_instances.