code: def _split_mp_arrays(
      target: Dict[str, Any]
  ) -> Tuple[Dict[str, Any], List[Tuple[MultiprocessArrayType, str]]]:
      """Split out the multiprocess arrays from the target pytree to save."""
      # When target is a single leaf instead of a pytree dict.
      if not isinstance(target, (core.FrozenDict, dict)):
          if _is_multiprocess_array(target):
              return MP_ARRAY_PH, [(target, "")]
          return target, []
      # Traverse the target and handle distributed arrays.
      flattened = traverse_util.flatten_dict(
          target, keep_empty_nodes=True
      )
      mpa_targets = []
      for key, value in flattened.items():
          if _is_multiprocess_array(value):
              subpath = "/".join(key)
              mpa_targets.append((value, subpath))
              flattened[key] = MP_ARRAY_PH + subpath
      target = traverse_util.unflatten_dict(flattened)
      return target, mpa_targets
  
imports: import functools
  import os
  import pathlib
  import re
  import time
  import warnings
  from concurrent.futures import thread
  from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Type, Union
  import jax
  import orbax.checkpoint
  from absl import logging
  from jax import monitoring, process_index
  from jax import tree_util
  from jax.experimental.array_serialization.serialization import GlobalAsyncCheckpointManager, get_tensorstore_spec
  from jax.experimental.multihost_utils import sync_global_devices
  from flax import config, core, errors, io, serialization, traverse_util
  from flax.training import orbax_utils
label_desc: Use image node_id 7 for calling a global function with example usage: _split_mp_arrays(target) and returns: target,  mpa_targets, target,  list, MP_ARRAY_PH,  list