def test_coreml_weight_metadata_api():
        """
        Test the example in the CoreMLWeightMetaData api doc string.
        """
        data = np.array([[1.0, 0.0], [0.0, 6.0]], dtype=np.float32)
        meta_data = CoreMLWeightMetaData(data)
        assert meta_data.val is data
        assert meta_data.sparsity == 0.5
        assert meta_data.unique_values == 3

        Test the example in the CoreMLWeightMetaData api doc string.
        
coremltools/test/optimize/coreml/test_post_training_quantization.py