def get_min_and_max_values(
    activation_stats: Dict[str, float],
    var_name: str,
) -> np.ndarray:
    """
    Utility to get the "rmin" and "rmax" values for a given var name in activation quantization.
    """
    if activation_stats is None:
        raise AssertionError(
            "'activation_stats' is required for calibration in activation quantization."
        )

    return np.array(
        [activation_stats[var_name]["rmin"], activation_stats[var_name]["rmax"]], dtype=np.float16
    )

    Utility to get the "rmin" and "rmax" values for a given var name in activation quantization.
    
coremltools/optimize/_utils.py