def METHOD_NAME(
    centroids_file,
    data_qcd_file,
    data_signal_file,
    k=2,
    test_size=10000,
    results_dir=None,
    data_dir=None,
):
    """Calculate anomaly scores for QCD and signal events.
    Parameters
    ----------
    data_qcd_file : str
        Name of the file for test QCD dataset.
    data_signal_file : str
        Name of the file for test signal dataset.
    k : int
        Number of classes in quantum k-medians.
    test_size : int
        Number of test samples.
    results_dir : str
        Path to file with saved centroids.
    data_dir : str
        Path to file with test datasets.
    Returns
    -------
    (:class:`numpy.ndarray`, :class:`numpy.ndarray`)
        loss = (Anomaly score for QCD data, Anomaly score for signal data).
    """
    if not results_dir:
        raise ValueError("Need to specify directory for loading the centroids.")
    # load centroids
    centroids = np.load(f"{results_dir}/{centroids_file}")
    test_qcd, test_sig = load_clustering_test_data(
        data_qcd_file, data_signal_file, test_size=test_size, k=k, read_dir=data_dir
    )
    loss = AD_scores(test_qcd, test_sig, centroids)
    return loss