code: def find_previous_open(gold_sequence, cur_index):
      """
      Go backwards from cur_index to find the open which opens the previous block of stuff.
  
      Return None if it can't be found.
      """
      count = 0
      cur_index = cur_index - 1
      while cur_index >= 0:
          if isinstance(gold_sequence[cur_index], OpenConstituent):
              count = count + 1
              if count > 0:
                  return cur_index
          elif isinstance(gold_sequence[cur_index], CloseConstituent):
              count = count - 1
          cur_index = cur_index - 1
      return None
  
imports: from enum import Enum, auto
  from stanza.models.constituency.dynamic_oracle import DynamicOracle
  from stanza.models.constituency.parse_transitions import Shift, OpenConstituent, CloseConstituent
label_desc: Use image node_id 10 for calling a global function with example usage: find_previous_open(gold_sequence, cur_index) and returns: None, cur_index