def aic_scorer(estimator, X, y_true = None) -> float:
    """AIC score for Gaussian Mixture Model Metric
    can be used in GridSearch for hyperparameter tuning

    :param estimator: must have ``aic`` method which returns aic score
    :param X:
    :param y_true:
    :return: the protocol requires greater the better, so it will return negative aic score
    """
    if not callable(getattr(estimator, "aic", None)):
        raise TypeError(f"This estimator: {estimator} does not have ``aic`` method, does not support aic metric")

    aic = estimator.aic(X)
    return -aic