code: def split(string):
      parts = []
      cursor = 0
      for pattern in IMAGES.finditer(string):
          start = pattern.start()
          if start != cursor:
              parts.append(string[cursor:start])
  
          parts.append(pattern.group(1))
          cursor = pattern.end()
  
      if cursor != len(string):
          parts.append(string[cursor:])
  
      return parts
  
imports: import torch
  import time
  from dataclasses import dataclass
  from opentelemetry import trace
  from transformers import AutoProcessor, AutoTokenizer, PreTrainedTokenizerBase, ProcessorMixin
  from typing import Optional, Tuple, List, Type, Dict
  from text_generation_server.models import Model
  from text_generation_server.models.types import Batch, Tokens, Generation, GeneratedText
  from text_generation_server.pb import generate_pb2
  from text_generation_server.utils import NextTokenChooser, StoppingCriteria, Sampling
  import re
label_desc: Use image node_id 1 for calling a global function with example usage: split(string) and returns: parts