code: def fix_close_shift_shift(
      gold_transition,
      pred_transition,
      gold_sequence,
      gold_index,
      root_labels,
  ):
      """
      Repair Close/Shift -> Shift by moving the Close to after the next block is created
      """
      if not isinstance(gold_transition, CloseConstituent):
          return None
      if not isinstance(pred_transition, Shift):
          return None
      if len(gold_sequence) < gold_index + 2:
          return None
      start_index = gold_index + 1
      start_index = advance_past_unaries(gold_sequence, start_index)
      if len(gold_sequence) < start_index + 2:
          return None
      if not isinstance(gold_sequence[start_index], Shift):
          return None
  
      end_index = find_constituent_end(gold_sequence, start_index)
      if end_index is None:
          return None
      # if this *isn't* a close, we don't allow it.
      # that case seems to be ambiguous...
      #   stuff_1 close stuff_2 stuff_3
      # if you would normally start building stuff_3,
      # it is not clear if you want to close at the end of
      # stuff_2 or build stuff_3 instead.
      if not isinstance(gold_sequence[end_index], CloseConstituent):
          return None
  
      return (
          gold_sequence[:gold_index]
          + gold_sequence[start_index:end_index]
          + [CloseConstituent()]
          + gold_sequence[end_index:]
      )
  
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 14 for calling a global function with example usage: fix_close_shift_shift(gold_transition, pred_transition, gold_sequence, gold_index, root_labels) and returns: unknown, None, None, None, None, None, None, None