def _get_changed_class(self, key, new_class, slice_dim=None):
        values, curr_class = self.get_values_and_class(key)
        if curr_class == new_class:
            return values

        if not new_class in self._preserving_changes[curr_class]:
            raise ValueError("Classification change would lose data.")

        if curr_class is None:
            curr_mult = 1
            per_slice = False
        else:
            curr_mult = self.get_multiplicity(curr_class)
            per_slice = curr_class[1] == 'slices'
        if new_class in self.get_valid_classes():
            new_mult = self.get_multiplicity(new_class)
            #Only way we get 0 for mult is if slice dim is undefined
            if new_mult == 0:
                new_mult = self.shape[slice_dim]
        else:
            new_mult = 1
        mult_fact = new_mult / curr_mult
        if curr_mult == 1:
            values = [values]


        if per_slice:
            result = values * mult_fact
        else:
            result = []
            for value in values:
                result.extend([deepcopy(value)] * mult_fact)

        if new_class == ('global', 'const'):
            result = result[0]

        return result
Create a znode.
dataset/ETHPy150Open moloney/dcmstack/src/dcmstack/dcmmeta.py/DcmMetaExtension._get_changed_class--crossover with--dataset/ETHPy150Open pinterest/kingpin/kingpin/tests/kazoo_utils/mock_kazoo_client.py/MockKazooClient.create