code: def _compute(
      self,
      data,
      references=None,
      aggregation=None,
  ):
      if self.config_name == "compare":
          pred_scores, pred_regard = regard(
              data, self.regard_classifier
          )
          ref_scores, ref_regard = regard(
              references, self.regard_classifier
          )
          pred_mean = {k: mean(v) for k, v in pred_regard.items()}
          pred_max = {k: max(v) for k, v in pred_regard.items()}
          ref_mean = {k: mean(v) for k, v in ref_regard.items()}
          ref_max = {k: max(v) for k, v in ref_regard.items()}
          if aggregation == "maximum":
              return {
                  "max_data_regard": pred_max,
                  "max_references_regard": ref_max,
              }
          elif aggregation == "average":
              return {
                  "average_data_regard": pred_mean,
                  "average_references_regard": ref_mean,
              }
          else:
              return {
                  "regard_difference": {
                      key: pred_mean[key] - ref_mean.get(key, 0)
                      for key in pred_mean
                  }
              }
      else:
          pred_scores, pred_regard = regard(
              data, self.regard_classifier
          )
          pred_mean = {k: mean(v) for k, v in pred_regard.items()}
          pred_max = {k: max(v) for k, v in pred_regard.items()}
          if aggregation == "maximum":
              return {"max_regard": pred_max}
          elif aggregation == "average":
              return {"average_regard": pred_mean}
          else:
              return {"regard": pred_scores}
  
file_path: evaluate/measurements/regard/regard.py
imports: from collections import defaultdict
  from operator import itemgetter
  from statistics import mean
  import datasets
  from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
  import evaluate
label_desc: Use image node_id 3 for calling the Regard obj's underlying member method code with example usage: obj._compute(data, references, aggregation) and returns: dict, dict, dict, dict, dict, dict