docstr: The function `compute_unified_responses` takes a list of feedback records and a rating question, and
  returns a unified value based on the specified unification method.
  
  Args:
  - records The `records` parameter is a list of `FeedbackRecord` objects. Each
      `FeedbackRecord` object represents a feedback response and contains information such as the
      respondent's name, the question being answered, and the response value.
  - question The `question` parameter is the question for which you want to unify the
      responses. It can be either a string or a `RatingQuestion` object. If it is a string, it
      represents the name of the question. If it is a `RatingQuestion` object, it represents the
      actual question
  
  Returns:
  The method `compute_unified_responses` returns the result of either the `_majority` or
  `_aggregate` method, depending on the value of `self.value`.
docstr_tok: ["The","function","`","compute_unified_responses","`","takes","a","list","of","feedback","records","and","a","rating","question",",","and","returns","a","unified","value","based","on","the","specified","unification","method",".","Args",":","-","records","The","`","records","`","parameter","is","a","list","of","`","FeedbackRecord","`","objects",".","Each","`","FeedbackRecord","`","object","represents","a","feedback","response","and","contains","information","such","as","the","respondent","'s","name",",","the","question","being","answered",",","and","the","response","value",".","-","question","The","`","question","`","parameter","is","the","question","for","which","you","want","to","unify","the","responses",".","It","can","be","either","a","string","or","a","`","RatingQuestion","`","object",".","If","it","is","a","string",",","it","represents","the","name","of","the","question",".","If","it","is","a","`","RatingQuestion","`","object",",","it","represents","the","actual","question","Returns",":","The","method","`","compute_unified_responses","`","returns","the","result","of","either","the","`","_majority","`","or","`","_aggregate","`","method",",","depending","on","the","value","of","`","self.value","`","."]
code: def compute_unified_responses(
      self,
      records: List[FeedbackRecord],
      question: Union[
          "RatingQuestionStrategy", "RankingQuestionStrategy"
      ],
  ):
      """
      The function `compute_unified_responses` takes a list of feedback records and a rating question, and
      returns a unified value based on the specified unification method.
  
      Args:
      - records The `records` parameter is a list of `FeedbackRecord` objects. Each
          `FeedbackRecord` object represents a feedback response and contains information such as the
          respondent's name, the question being answered, and the response value.
      - question The `question` parameter is the question for which you want to unify the
          responses. It can be either a string or a `RatingQuestion` object. If it is a string, it
          represents the name of the question. If it is a `RatingQuestion` object, it represents the
          actual question
  
      Returns:
      The method `compute_unified_responses` returns the result of either the `_majority` or
      `_aggregate` method, depending on the value of `self.value`.
      """
      UnifiedValueSchema.update_forward_refs()
      # check if field is a str or a RatingQuestion
      if isinstance(question, str):
          pass
      elif isinstance(question, (RatingQuestion, RankingQuestion)):
          question = question.name
      else:
          raise ValueError(
              f"Invalid field type. Must be a str or {type(self).__name__}"
          )
      # choose correct unification method
      if self.value == self.MAJORITY.value:
          return self._majority(records, question)
      else:
          return self._aggregate(records, question)
  
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 1 for calling the RatingQuestionStrategyMixin obj's underlying member method code with example usage: obj.compute_unified_responses(records, question) and returns: self, self