code: def test_one_goal_with_opts(self):
      result = self.__helper(
          api_schemas_machine=API_SCHEMA__ONE_CALL_MATCH_THREE_KEYS,
          goal_calls_machine=GOAL__SINGLE_THREE_KEYS,
          single_turn_api_call=API_CALL__SINGLE_ONE_KEY,
      )
      self.assertAlmostEqual(result["all_goals_hit"], 0)
      self.assertAlmostEqual(result["all_goals_hit_turn_count"], 0)
      self.assertAlmostEqual(result["all_goals_fractional_hit"], 0)
      self.assertAlmostEqual(result["all_goals_slot_precision"], 1)
      self.assertAlmostEqual(result["all_goals_slot_recall"], 0.5)
  
      self.assertAlmostEqual(result["req_goals_hit"], 1)
      self.assertAlmostEqual(result["req_goals_hit_turn_count"], 1)
      self.assertAlmostEqual(result["req_goals_fractional_hit"], 1)
      self.assertAlmostEqual(result["req_goals_slot_precision"], 1)
      self.assertAlmostEqual(result["req_goals_slot_recall"], 1)
  
imports: import unittest
  from parlai.core.tod.tod_core import STANDARD_API_NAME_SLOT, STANDARD_REQUIRED_KEY, STANDARD_OPTIONAL_KEY, TodStructuredRound, TodStructuredEpisode, TodAgentType, TOD_AGENT_TYPE_TO_PREFIX
  from parlai.core.tod.world_metrics import TodMetrics
  from parlai.core.tod.world_metrics_handlers import METRICS_HANDLER_CLASSES_TEST_REGISTRY
  import projects.tod_simulator.world_metrics.extended_world_metrics
label_desc: Use image node_id 4 for calling the TestApiGoalHitMetricsHandler obj's underlying member method code with example usage: obj.test_one_goal_with_opts() without return types