class_docstr: Class to compile results from static turn annotations.
  
  Change PROBLEM_BUCKETS in task_config/annotations_config.json to be the buckets that
  you are asking crowdsource workers to annotate with.
  
  NOTE this script directly accesses Mephisto files rather than using the DataBrowser.
  This makes it fragile and not a great example for extension. It is a good candidate
  for refactor.
class_docstr_tok: ["Class","to","compile","results","from","static","turn","annotations",".","Change","PROBLEM_BUCKETS","in","task_config\/annotations_config.json","to","be","the","buckets","that","you","are","asking","crowdsource","workers","to","annotate","with",".","NOTE","this","script","directly","accesses","Mephisto","files","rather","than","using","the","DataBrowser",".","This","makes","it","fragile","and","not","a","great","example","for","extension",".","It","is","a","good","candidate","for","refactor","."]
code: def __init__(self, opt: Dict[str, Any]):
      super().__init__(opt)
  
      if "results_folders" in opt:
          self.results_folders = opt["results_folders"].split(",")
      else:
          self.results_folders = None
  
      # Validate problem buckets
      if (
          self.use_problem_buckets
          and "none_all_good" not in self.problem_buckets
      ):
          # The code relies on a catchall "none" category if the user selects no other
          # annotation bucket
          raise ValueError(
              'There must be a "none_all_good" category in self.problem_buckets!'
          )
      self.onboarding_in_flight_data_file = opt.get(
          "onboarding_in_flight_data_file"
      )
      self.gold_annotations_file = opt.get("gold_annotations_file")
      if not self.use_problem_buckets:
          raise ValueError(
              "Problem buckets must be used when analyzing results from the static turn annotations task!"
          )
  
imports: import copy
  import json
  import os
  from datetime import datetime
  from typing import Any, Dict, Optional, Tuple
  import numpy
  import pandas
  from parlai.crowdsourcing.utils.analysis import AbstractTurnAnnotationResultsCompiler
label_desc: Use image node_id 2 to create a new TurnAnnotationsStaticResultsCompiler object from inherited base classes: AbstractTurnAnnotationResultsCompiler with example: obj = TurnAnnotationsStaticResultsCompiler(opt)