def _get_weight_param_summary(wp):
    """Get a summary of proto.NeuralNetwork_pb2.WeightParams
    Args:
    wp : proto.NeuralNetwork_pb2.WeightParams - the proto.NeuralNetwork_pb2.WeightParams message to display
    Returns:
    a str summary for wp
    """
    summary_str = ""
    if wp.HasField("quantization"):
        nbits = wp.quantization.numberOfBits
        quant_type = (
            "linearly"
            if wp.quantization.HasField("linearQuantization")
            else "lookup-table"
        )
        summary_str += "{}-bit {} quantized".format(nbits, quant_type)

    if len(wp.floatValue) > 0:
        summary_str += "({} floatValues)".format(len(wp.floatValue))
    if len(wp.float16Value) > 0:
        summary_str += "({} bytes float16Values)".format(len(wp.float16Value))
    if len(wp.rawValue) > 0:
        summary_str += "({} bytes rawValues)".format(len(wp.rawValue))

    return summary_str
Get a summary of proto.NeuralNetwork_pb2.WeightParams
    Args:
    wp : proto.NeuralNetwork_pb2.WeightParams - the proto.NeuralNetwork_pb2.WeightParams message to display
    Returns:
    a str summary for wp
    
coremltools/models/neural_network/spec_inspection_utils.py