def _update_ref(self, bch, obj_type, obj_uuid, ref_obj_type, old_ref_uuid, new_ref_infos):
    if (ref_obj_type not in new_ref_infos):
        return []
    symmetric_ref_updates = []
    if (old_ref_uuid not in new_ref_infos[ref_obj_type]):
        self._cassandra_driver.remove(obj_uuid, columns=[('ref:%s:%s' % (ref_obj_type, old_ref_uuid))], batch=bch)
        if (obj_type == ref_obj_type):
            self._cassandra_driver.remove(old_ref_uuid, columns=[('ref:%s:%s' % (obj_type, obj_uuid))], batch=bch)
            try:
                self.update_last_modified(bch, obj_type, old_ref_uuid)
                symmetric_ref_updates = [old_ref_uuid]
            except NoIdError as e:
                pass
        else:
            self._cassandra_driver.remove(old_ref_uuid, columns=[('backref:%s:%s' % (obj_type, obj_uuid))], batch=bch)
    else:
        new_ref_data = new_ref_infos[ref_obj_type][old_ref_uuid]
        j_new_ref_data = json.dumps(new_ref_data)
        self._cassandra_driver.insert(obj_uuid, {('ref:%s:%s' % (ref_obj_type, old_ref_uuid)): j_new_ref_data}, batch=bch)
        if (obj_type == ref_obj_type):
            self._cassandra_driver.insert(old_ref_uuid, {('ref:%s:%s' % (obj_type, obj_uuid)): j_new_ref_data}, batch=bch)
            self.update_last_modified(bch, obj_type, old_ref_uuid)
            symmetric_ref_updates = [old_ref_uuid]
        else:
            self._cassandra_driver.insert(old_ref_uuid, {('backref:%s:%s' % (obj_type, obj_uuid)): j_new_ref_data}, batch=bch)
        del new_ref_infos[ref_obj_type][old_ref_uuid]
    if (ref_obj_type not in self._obj_cache_exclude_types):
        if (ref_obj_type == obj_type):
            self._obj_cache_mgr.evict(obj_type, [old_ref_uuid])
        else:
            self.update_latest_col_ts(bch, old_ref_uuid)
    return symmetric_ref_updates
def _update_ref(self, bch, obj_type, obj_uuid, ref_obj_type, old_ref_uuid, new_ref_infos):
    if (ref_obj_type not in new_ref_infos):
        return []
    symmetric_ref_updates = []
    if (old_ref_uuid not in new_ref_infos[ref_obj_type]):
        self._cassandra_driver.remove(obj_uuid, columns=[('ref:%s:%s' % (ref_obj_type, old_ref_uuid))], batch=bch)
        if (obj_type == ref_obj_type):
            self._cassandra_driver.remove(old_ref_uuid, columns=[('ref:%s:%s' % (obj_type, obj_uuid))], batch=bch)
            try:
                self.update_last_modified(bch, obj_type, old_ref_uuid)
                symmetric_ref_updates = [old_ref_uuid]
            except NoIdError as e:
                pass
        else:
            self._cassandra_driver.remove(old_ref_uuid, columns=[('backref:%s:%s' % (obj_type, obj_uuid))], batch=bch)
    else:
        new_ref_data = new_ref_infos[ref_obj_type][old_ref_uuid]
        j_new_ref_data = json.dumps(new_ref_data)
        self._cassandra_driver.insert(obj_uuid, {('ref:%s:%s' % (ref_obj_type, old_ref_uuid)): j_new_ref_data}, batch=bch)
        if (obj_type == ref_obj_type):
            self._cassandra_driver.insert(old_ref_uuid, {('ref:%s:%s' % (obj_type, obj_uuid)): j_new_ref_data}, batch=bch)
            self.update_last_modified(bch, obj_type, old_ref_uuid)
            symmetric_ref_updates = [old_ref_uuid]
        else:
            self._cassandra_driver.insert(old_ref_uuid, {('backref:%s:%s' % (obj_type, obj_uuid)): j_new_ref_data}, batch=bch)
        del new_ref_infos[ref_obj_type][old_ref_uuid]
    if (ref_obj_type not in self._obj_cache_exclude_types):
        if (ref_obj_type == obj_type):
            self._obj_cache_mgr.evict(obj_type, [old_ref_uuid])
        else:
            self.update_latest_col_ts(bch, old_ref_uuid)
    return symmetric_ref_updates