class_docstr: Options:
      - "mean": the mean value of the ratings
      - "majority": the majority value of the ratings
      - "max": the max value of the ratings
      - "min": the min value of the ratings
docstr: The function `_aggregate` takes a list of feedback records and a question, and aggregates the
  responses for that question using a specified method (mean, max, or min) and returns the updated
  records.
  
  Args:
  - records The `records` parameter is a list of `FeedbackRecord` objects. Each
      `FeedbackRecord` object represents a feedback submission and contains information about the
      responses given by the user.
  - question The "question" parameter in the code represents the specific question or
      attribute for which the feedback records need to be aggregated. It is a string that identifies
      the question or attribute being considered.
  
  Returns: the updated list of feedback records with the unified responses for the specified
  question.
docstr_tok: ["The","function","`","_aggregate","`","takes","a","list","of","feedback","records","and","a","question",",","and","aggregates","the","responses","for","that","question","using","a","specified","method","(","mean",",","max",",","or","min",")","and","returns","the","updated","records",".","Args",":","-","records","The","`","records","`","parameter","is","a","list","of","`","FeedbackRecord","`","objects",".","Each","`","FeedbackRecord","`","object","represents","a","feedback","submission","and","contains","information","about","the","responses","given","by","the","user",".","-","question","The","``","question","''","parameter","in","the","code","represents","the","specific","question","or","attribute","for","which","the","feedback","records","need","to","be","aggregated",".","It","is","a","string","that","identifies","the","question","or","attribute","being","considered",".","Returns",":","the","updated","list","of","feedback","records","with","the","unified","responses","for","the","specified","question","."]
code: def _aggregate(self, records: List[FeedbackRecord], question: str):
      """
      The function `_aggregate` takes a list of feedback records and a question, and aggregates the
      responses for that question using a specified method (mean, max, or min) and returns the updated
      records.
  
      Args:
      - records The `records` parameter is a list of `FeedbackRecord` objects. Each
          `FeedbackRecord` object represents a feedback submission and contains information about the
          responses given by the user.
      - question The "question" parameter in the code represents the specific question or
          attribute for which the feedback records need to be aggregated. It is a string that identifies
          the question or attribute being considered.
  
      Returns: the updated list of feedback records with the unified responses for the specified
      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
          ratings = []
          for resp in responses:
              if question in resp.values:
                  ratings.append(int(resp.values[question].value))
          if not ratings:
              continue
          # unified response
          if self.value == self.MEAN.value:
              unified_value = str(int(sum(ratings) / len(ratings)))
          elif self.value == self.MAX.value:
              unified_value = str(max(ratings))
          elif self.value == self.MIN.value:
              unified_value = str(min(ratings))
          else:
              raise ValueError("Invalid aggregation method")
          rec._unified_responses[question] = [
              UnifiedValueSchema(
                  value=unified_value, strategy=self.value
              )
          ]
      return records
  
imports: import random
  from abc import abstractmethod
  from collections import Counter
  from enum import Enum
  from typing import Any, Dict, List, Union
  import pandas
  from argilla.client.feedback.schemas import FeedbackRecord, LabelQuestion, MultiLabelQuestion, RankingQuestion, RatingQuestion, ValueSchema
  from argilla.pydantic_v1 import BaseModel, root_validator, validator
label_desc: Use image node_id 2 for calling the RatingQuestionStrategy obj's underlying member method code with example usage: obj._aggregate(records, question) and returns: records