DRY: Putting the logic that determines the USER_MODEL to be used in migrations, in one function that can be reused.