@classmethod
    def update_offloading_modes(cls, instance, new_modes, keep_states=False):
        if keep_states:
            old_modes_states = instance.offloading_modes_as_flat_dict(
                instance.offloading_modes)
            for mode in new_modes:
                if mode["name"] in old_modes_states:
                    mode["state"] = old_modes_states[mode["name"]]
        instance.offloading_modes = new_modes
Testing coordinate dimension is the same on transformed geometries.
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/extensions/network_manager/objects/interface.py/NIC.update_offloading_modes--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/contrib/gis/gdal/tests/test_geom.py/OGRGeomTest.test09c_transform_dim