code: def split_axes(old: ChunkedAxes, new: ChunkedAxes) -> SplitAxes:
      """Calculate how to split the old chunks on each axis to create the new chunks
  
      Parameters
      ----------
      old : ChunkedAxes
          Chunks along each axis of the old array
      new : ChunkedAxes
          Chunks along each axis of the new array
  
      Returns
      -------
      SplitAxes
          Splits along each axis that determine how to slice the input chunks to create
          the new chunks by concatenating the resulting shards.
      """
      from dask.array.rechunk import old_to_new
  
      _old_to_new = old_to_new(old, new)
  
      axes = []
      for axis_index, new_axis in enumerate(_old_to_new):
          old_axis: SplitAxis = [[] for _ in old[axis_index]]
          for new_chunk_index, new_chunk in enumerate(new_axis):
              for split_index, (old_chunk_index, slice) in enumerate(
                  new_chunk
              ):
                  old_axis[old_chunk_index].append(
                      Split(new_chunk_index, split_index, slice)
                  )
          for old_chunk in old_axis:
              old_chunk.sort(key=lambda split: split.slice.start)
          axes.append(old_axis)
      return axes
  
imports: from __future__ import annotations
  import mmap
  import os
  from collections import defaultdict
  from collections.abc import Callable, Generator, Hashable, Sequence
  from concurrent.futures import ThreadPoolExecutor
  from dataclasses import dataclass
  from itertools import product
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, NamedTuple
  import toolz
  from tornado.ioloop import IOLoop
  import dask
  from dask.base import tokenize
  from dask.highlevelgraph import HighLevelGraph, MaterializedLayer
  from dask.typing import Key
  from distributed.core import PooledRPCCall
  from distributed.metrics import context_meter
  from distributed.shuffle._core import NDIndex, ShuffleId, ShuffleRun, ShuffleSpec, get_worker_plugin, handle_transfer_errors, handle_unpack_errors
  from distributed.shuffle._limiter import ResourceLimiter
  from distributed.shuffle._pickle import unpickle_bytestream
  from distributed.shuffle._shuffle import barrier_key, shuffle_barrier
  from distributed.shuffle._worker_plugin import ShuffleWorkerPlugin
  from distributed.sizeof import sizeof
label_desc: Use image node_id 14 for calling a global function with example usage: split_axes(old, new) and returns: axes