def METHOD_NAME(
    self,
    performance_df,
    validation_df,
    selection_threshold=None,
    use_labels=True,
    method="hard",
):
    """
    Compute the results at the image-level by assembling the results on parts of the image.
    Args:
        performance_df (pd.DataFrame): results that need to be assembled.
        validation_df (pd.DataFrame): results on the validation set used to compute the performance
            of each separate part of the image.
        selection_threshold (float): with soft-voting method, allows to exclude some parts of the image
            if their associated performance is too low.
        use_labels (bool): If True, metrics are computed and the label column values must be different
            from None.
        method (str): method to assemble the results. Current implementation proposes only hard-voting.
    Returns:
        df_final (pd.DataFrame) the results on the image level
        results (Dict[str, float]) the metrics on the image level
    """
    if method != "hard":
        raise NotImplementedError(
            f"You asked for {method} ensemble method. "
            f"The only method implemented for regression is hard-voting."
        )
    n_modes = validation_df[f"{self.mode}_id"].nunique()
    weight_series = np.ones(n_modes)
    # Sort to allow weighted average computation
    performance_df.sort_values(
        ["participant_id", "session_id", f"{self.mode}_id"], inplace=True
    )
    # Soft majority vote
    df_final = pd.DataFrame(columns=self.columns)
    for (subject, session), subject_df in performance_df.groupby(
        ["participant_id", "session_id"]
    ):
        label = subject_df["true_label"].unique().item()
        prediction = np.average(
            subject_df["predicted_label"], weights=weight_series
        )
        row = [[subject, session, 0, label, prediction]]
        row_df = pd.DataFrame(row, columns=self.columns)
        df_final = pd.concat([df_final, row_df])
    if use_labels:
        results = self.compute_metrics(df_final)
    else:
        results = None
    return df_final, results