code: def partition_sequence(xs: Sequence, n):
      slices = divide_into(len(xs), n)
  
      start = 0
      partitions = []
      for slice_length in slices:
          partitions.append(xs[start : start + slice_length])
          start += slice_length
  
      return partitions
  
imports: from collections.abc import Sequence
  from functools import singledispatch
label_desc: Use image node_id 3 for calling a global function with example usage: partition_sequence(xs, n) and returns: partitions