code: def compute_percent_invalid_trees(
      frame_pairs: Sequence[FramePredictionPair],
  ) -> float:
      """
      Computes percent of invlaid trees given a list of predicted and gold intent frames.
  
      Args:
          frame_pairs: List of predicted and gold intent frames.
  
      Returns:
          Percent of invalid trees. A tree is invalid if its frame label matches
          INVALID_TREE_STR
      """
      num_invalid = 0
      num_samples = len(frame_pairs)
      for predicted_frame, _ in frame_pairs:
          num_invalid += int(
              predicted_frame.label == INVALID_TREE_INTENT
          )
      return safe_division(num_invalid, num_samples)
  
imports: from collections import Counter, defaultdict
  from copy import deepcopy
  from typing import AbstractSet, Any, Callable, Counter, Dict, List, NamedTuple, Optional, Sequence, Tuple
  from pytext.data.data_structures.annotation import INVALID_TREE_INTENT
  from pytext.data.data_structures.node import Node, Span
  from .None import AllConfusions, Confusions, PerLabelConfusions, PRF1Metrics, PRF1Scores, safe_division
label_desc: Use image node_id 11 for calling a global function with example usage: compute_percent_invalid_trees(frame_pairs) and returns: safe_division