code: def handle_api_call(
      self, message: Message, api_call: Dict
  ) -> Optional[Dict[str, Metric]]:
      if STANDARD_API_SCHEMAS in message["text"]:
          return  # Happens for API call groundingion, so it's fine
      if len(api_call) == 0:
          return
      if STANDARD_API_NAME_SLOT not in api_call:
          return {
              "apiCall_wellFormed": AverageMetric(0),
              "apiCall_hasSlotsButNoApiNameSlot_count": SumMetric(1),
          }
      method = api_call[STANDARD_API_NAME_SLOT]
  
      method_found = False
      if len(self.api_schemas) > 0:
          for schema in self.api_schemas:
              if method == schema.get(STANDARD_API_NAME_SLOT, ""):
                  method_found = True
                  check = api_call.keys()
                  required = set(schema.get(STANDARD_REQUIRED_KEY, []))
                  required.add(STANDARD_API_NAME_SLOT)
                  for req in required:
                      if req not in check:  # miissing required
                          return {
                              "apiCall_wellFormed": AverageMetric(0),
                              "apiCall_missingRequiredSlot_count": SumMetric(
                                  1
                              ),
                          }
                  opt_count = 0
                  for opt in schema.get(STANDARD_OPTIONAL_KEY, []):
                      if opt in check:
                          opt_count += 1
                  if opt_count + len(required) != len(check):
                      # have extra APIs that are not
                      return {
                          "apiCall_wellFormed": AverageMetric(0),
                          "apiCall_hasExtraParams_count": SumMetric(1),
                      }
                  break
      if method_found:
          return {
              "apiCall_wellFormed": AverageMetric(1),
              "apiCall_wellFormed_count": SumMetric(1),
          }
      return {
          "apiCall_wellFormed": AverageMetric(0),
          "apiCall_methodDNE_count": SumMetric(1),
      }
  
imports: from parlai.core.message import Message
  from parlai.core.metrics import Metric, AverageMetric, normalize_answer, BleuMetric, SumMetric
  from parlai.core.tod.tod_core import STANDARD_API_NAME_SLOT, STANDARD_REQUIRED_KEY, STANDARD_OPTIONAL_KEY, STANDARD_API_SCHEMAS
  from typing import Dict, List, Optional, Tuple
  from parlai.core.tod.world_metrics_handlers import TodMetricsHandler, register_metrics_handler, _ApiCallGoalInteractionHelper, goals_hit_helper
label_desc: Use image node_id 2 for calling the ApiCallMalformedMetricHandler obj's underlying member method code with example usage: obj.handle_api_call(message, api_call) and returns: dict, dict, dict, dict, dict