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 _get_inflight_onboarding_success_from_subtask(self, subtask):
      if self.INFLIGHT_ONBOARDING_DATA is None:
          self.INFLIGHT_ONBOARDING_DATA = (
              self.setup_inflight_onboarding_data()
          )
      onboarding_utterance = subtask["data"][-1]
      num_answers = 0
      num_correct = 0
      num_incorrect = 0
      for d in self.INFLIGHT_ONBOARDING_DATA:
          if (
              d["dialog"][-1][-1]["text"]
              == onboarding_utterance["text"]
          ):
              num_answers = len(d["answers"])
              for pb in self.problem_buckets:
                  if pb in d["answers"] and onboarding_utterance[pb]:
                      num_correct += 1
                  if (
                      onboarding_utterance[pb]
                      and pb not in d["answers"]
                  ):
                      num_incorrect += 1
      return num_correct / num_answers
  
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 8 for calling the TurnAnnotationsStaticResultsCompiler obj's underlying member method code with example usage: obj._get_inflight_onboarding_success_from_subtask(subtask) and returns: unknown