def METHOD_NAME(
    X_val,
    y_val,
    estimator,
    labels,
    X_train,
    y_train,
    weight_val=None,
    weight_train=None,
    *args,
):
    val_metric = coeff * calc_metric(X_val, y_val, estimator)
    train_metric = calc_metric(X_train, y_train, estimator)
    main_metric = coeff * val_metric
    return main_metric, {
        f"{metric_name}_train": train_metric,
        f"{metric_name}_val": val_metric,
    }