def _aggregate(self, records: List[FeedbackRecord], question: str):
        """
        The function `_aggregate` takes a list of `FeedbackRecord` objects and a question, and
        aggregates the responses for that question based on a specified aggregation method.

        Args:
        - records The `records` parameter is a list of `FeedbackRecord` objects. Each
        `FeedbackRecord` object represents a feedback record and contains information about the
        responses given for a particular feedback.
        - question The `question` parameter in the `_aggregate` method is a string that represents
        the question for which the responses are being aggregated.

        Returns:
        the updated list of FeedbackRecord objects after aggregating the responses for the
        specified question.
        """
        if self.value == self.MEAN.value:
            return self._mean(records, question)

        for rec in records:
            if not rec.responses:
                continue
            # only allow for submitted responses
            responses = [resp for resp in rec.responses if resp.status == "submitted"]
            # get responses with a value that is most frequent
            total_values = []
            total_ranks = []
            for resp in responses:
                if question in resp.values:
                    values = []
                    ranks = []
                    for value in resp.values[question].value:
                        values.append(value.value)
                        ranks.append(value.rank)

                    total_values.append(tuple(values))
                    total_ranks.append(tuple(ranks))

            if not total_values:
                continue
            df = pd.DataFrame({"value": total_values, "rank": total_ranks})

            # unified response
            if self.value == self.MAX.value:
                df = df[df["rank"] == df["rank"].max()]
            elif self.value == self.MIN.value:
                df = df[df["rank"] == df["rank"].min()]
            else:
                raise ValueError("Invalid aggregation method")

            if len(df) > 0:
                # Extract the first of the possible values (in case there is more than one).
                unified_rank = [{"rank": item[1], "value": item[0]} for item in zip(*df.iloc[0].to_list())]
                rec._unified_responses[question] = [UnifiedValueSchema(value=unified_rank, strategy=self.value)]

        return records

        The function `_aggregate` takes a list of `FeedbackRecord` objects and a question, and
        aggregates the responses for that question based on a specified aggregation method.

        Args:
        - records The `records` parameter is a list of `FeedbackRecord` objects. Each
        `FeedbackRecord` object represents a feedback record and contains information about the
        responses given for a particular feedback.
        - question The `question` parameter in the `_aggregate` method is a string that represents
        the question for which the responses are being aggregated.

        Returns:
        the updated list of FeedbackRecord objects after aggregating the responses for the
        specified question.
        
argilla-v1/src/argilla_v1/client/feedback/unification.py