code: def find_bracket_num(tree_str):
      """
      Count Bracket Number (num_left - num_right), 0 indicates num_left = num_right
      """
      count = 0
      for char in tree_str:
          if char == left_bracket:
              count += 1
          elif char == right_bracket:
              count -= 1
          else:
              pass
      return count
  
imports: from collections import Counter
  import logging
  from nltk.tree import ParentedTree
  import re
  from typing import Tuple, List, Dict
  from ...extraction.constants import null_span, type_start, type_end, span_start
  from ...extraction.predict_parser.predict_parser import PredictParser
  from ...extraction.predict_parser.utils import fix_unk_from_text
label_desc: Use image node_id 3 for calling a global function with example usage: find_bracket_num(tree_str) and returns: count