code: def _breakpoints(cumold, cumnew):
      """
  
      >>> new = cumdims_label(((2, 3), (2, 2, 1)), 'n')
      >>> old = cumdims_label(((2, 2, 1), (5,)), 'o')
  
      >>> _breakpoints(new[0], old[0])
      (('n', 0), ('o', 0), ('n', 2), ('o', 2), ('o', 4), ('n', 5), ('o', 5))
      >>> _breakpoints(new[1], old[1])
      (('n', 0), ('o', 0), ('n', 2), ('n', 4), ('n', 5), ('o', 5))
      """
      return tuple(sorted(cumold + cumnew, key=itemgetter(1)))
  
imports: from __future__ import annotations
  import heapq
  import math
  from functools import reduce
  from itertools import chain, count, product
  from operator import add, itemgetter, mul
  from warnings import warn
  import numpy
  import tlz
  from tlz import accumulate
  from dask import config
  from dask.array.chunk import getitem
  from dask.array.core import Array, concatenate3, normalize_chunks
  from dask.array.utils import validate_axis
  from dask.array.wrap import empty
  from dask.base import tokenize
  from dask.highlevelgraph import HighLevelGraph
  from dask.utils import parse_bytes
label_desc: Use image node_id 2 for calling a global function with example usage: _breakpoints(cumold, cumnew) and returns: tuple