def _register_compression_metadata(
        self, param_name: str, param: _torch.Tensor, lut: _torch.Tensor
    ):
        """
        Register compression metadata on the model so that it can be serialized.
        """
        metadata = self._get_compression_metadata(param_name, param, lut)
        metadata.register(self.module)

        Register compression metadata on the model so that it can be serialized.
        
coremltools/optimize/torch/_utils/k_means.py