code: def split_reads(reads):
      """Splits reads containing SKIP cigar operations into multiple parts."""
  
      read_split = []
      for read in reads:
          # Check for SKIP operations within the Cigar String
          if not any(
              [
                  c.operation == cigar_pb2.CigarUnit.SKIP
                  for c in read.alignment.cigar
              ]
          ):
              read_split.append(read)
              continue
          part = 0
          new_read = copy_read(read, part)
          # Get alignment position
          read_start = 0
          read_offset = 0
          reference_offset = 0
  
          for n, cigar in enumerate(read.alignment.cigar):
              on_last_operation = n + 1 == len(read.alignment.cigar)
  
              if cigar.operation in REF_ADVANCING_OPS:
                  # Set position where the first ref op encountered.
                  if not new_read.alignment.position.position:
                      new_read.alignment.position.position = (
                          read.alignment.position.position
                          + reference_offset
                      )
                  reference_offset += cigar.operation_length
  
              if cigar.operation in READ_ADVANCING_OPS:
                  read_offset += cigar.operation_length
  
              if cigar.operation != cigar_pb2.CigarUnit.SKIP:
                  new_read.alignment.cigar.append(cigar)
  
              if (
                  cigar.operation == cigar_pb2.CigarUnit.SKIP
                  or on_last_operation
              ):
                  new_read.aligned_sequence = read.aligned_sequence[
                      read_start:read_offset
                  ]
                  new_read.aligned_quality.extend(
                      read.aligned_quality[read_start:read_offset]
                  )
                  if len(new_read.aligned_sequence) >= _MIN_SPLIT_LEN:
                      read_split.append(new_read)
                  if not on_last_operation:
                      read_start = read_offset
                      part += 1
                      new_read = copy_read(read, part)
  
      return read_split
  
imports: import csv
  import os
  import os.path
  from absl import flags
  from etils import epath
  from deepvariant.protos import realigner_pb2
  from deepvariant.realigner import window_selector
  from deepvariant.realigner.python import debruijn_graph
  from deepvariant.realigner.python import fast_pass_aligner
  from deepvariant.vendor import timer
  from google.protobuf import text_format
  from third_party.nucleus.io import sam
  from third_party.nucleus.protos import cigar_pb2
  from third_party.nucleus.protos import reads_pb2
  from third_party.nucleus.util import cigar
  from third_party.nucleus.util import ranges
  from third_party.nucleus.util import utils
  from third_party.nucleus.util.cigar import READ_ADVANCING_OPS
  from third_party.nucleus.util.cigar import REF_ADVANCING_OPS
label_desc: Use image node_id 5 for calling a global function with example usage: split_reads(reads) and returns: read_split