class_docstr: Calculates synthetic Task Success + related metrics for converseations.
  
  Test coverage of this class is with `LegacyGoalApiCallInteractionsMetricsHandler`
class_docstr_tok: ["Calculates","synthetic","Task","Success","+","related","metrics","for","converseations",".","Test","coverage","of","this","class","is","with","`","LegacyGoalApiCallInteractionsMetricsHandler","`"]
code: def get_episode_metrics(self) -> Optional[Dict[str, Metric]]:
      all_goals_hit, _, _ = goals_hit_helper(self.goals, self.api_turns)
      call_attempts = len(self.api_turns)
      return {
          "synthetic_task_success": all_goals_hit,
          "api_call_attempts": AverageMetric(call_attempts),
      }
  
imports: from parlai.core.message import Message
  from parlai.core.metrics import Metric, AverageMetric
  from parlai.core.tod.tod_core import STANDARD_DONE
  from typing import Dict, List, Optional
label_desc: Use image node_id 1 for calling the AllGoalApiCallSuccessMetricsHandler obj's underlying member method code with example usage: obj.get_episode_metrics() and returns: dict