def _unscale_by_per_channel_scale(self, param_name: str, param: _torch.Tensor) -> _torch.Tensor:
        """
        Re-scale the parameter with ``param_name`` back to its original range by multiplying
        per channel scales.
        """
        if self.config[param_name].enable_per_channel_scale:
            per_channel_scale = self._parameter_metadata[param_name]["per_channel_scale"]
            flattened_param = param.flatten(1)
            flattened_param *= per_channel_scale
            param = flattened_param.reshape(param.shape)
        return param

        Re-scale the parameter with ``param_name`` back to its original range by multiplying
        per channel scales.
        
coremltools/optimize/torch/_utils/k_means.py