code: def regard(group, regard_classifier):
      group_scores = defaultdict(list)
      group_regard = regard_classifier(group)
      for pred in group_regard:
          for pred_score in pred:
              group_scores[pred_score["label"]].append(
                  pred_score["score"]
              )
      return group_regard, dict(group_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 1 for calling a global function with example usage: regard(group, regard_classifier) and returns: group_regard,  dict