def METHOD_NAME(source_model):
    groups = [InstanceGroup.objects.create(name='host-%d' % i) for i in range(5)]
    groups.reverse()
    for group in groups:
        source_model.instance_groups.add(group)
    assert [g.name for g in source_model.instance_groups.all()] == ['host-4', 'host-3', 'host-2', 'host-1', 'host-0']
    assert [g.name for g in source_model.instance_groups.order_by('name').all()] == ['host-0', 'host-1', 'host-2', 'host-3', 'host-4']