code: def _combine_concat_plans(plans):
      """
      Combine multiple concatenation plans into one.
  
      existing_plan is updated in-place.
  
      We only get here with concat_axis == 1.
      """
      if len(plans) == 1:
          for p in plans[0]:
              yield p[0], [p[1]]
  
      else:
          # singleton list so we can modify it as a side-effect within _next_or_none
          num_ended = [0]
  
          def _next_or_none(seq):
              retval = next(seq, None)
              if retval is None:
                  num_ended[0] += 1
              return retval
  
          plans = list(map(iter, plans))
          next_items = list(map(_next_or_none, plans))
  
          while num_ended[0] != len(next_items):
              if num_ended[0] > 0:
                  raise ValueError("Plan shapes are not aligned")
  
              placements, units = zip(*next_items)
  
              lengths = list(map(len, placements))
              min_len, max_len = min(lengths), max(lengths)
  
              if min_len == max_len:
                  yield placements[0], units
                  next_items[:] = map(_next_or_none, plans)
              else:
                  yielded_placement = None
                  yielded_units = [None] * len(next_items)
                  for i, (plc, unit) in enumerate(next_items):
                      yielded_units[i] = unit
                      if len(plc) > min_len:
                          # _trim_join_unit updates unit in place, so only
                          # placement needs to be sliced to skip min_len.
                          next_items[i] = (
                              plc[min_len:],
                              _trim_join_unit(unit, min_len),
                          )
                      else:
                          yielded_placement = plc
                          next_items[i] = _next_or_none(plans[i])
  
                  yield yielded_placement, yielded_units
  
imports: from __future__ import annotations
  import copy
  import itertools
  from typing import TYPE_CHECKING, Sequence, cast
  import numpy
  from pandas._libs import NaT, internals
  from pandas._libs.missing import NA
  from pandas._typing import ArrayLike, AxisInt, DtypeObj, Manager, Shape
  from pandas.util._decorators import cache_readonly
  from pandas.core.dtypes.astype import astype_array
  from pandas.core.dtypes.cast import ensure_dtype_can_hold_na, find_common_type, np_find_common_type
  from pandas.core.dtypes.common import is_1d_only_ea_dtype, is_dtype_equal, is_scalar, needs_i8_conversion
  from pandas.core.dtypes.concat import concat_compat
  from pandas.core.dtypes.dtypes import DatetimeTZDtype, ExtensionDtype
  from pandas.core.dtypes.missing import is_valid_na_for_dtype, isna, isna_all
  import pandas.core.algorithms
  from pandas.core.arrays import DatetimeArray, ExtensionArray
  from pandas.core.arrays.sparse import SparseDtype
  from pandas.core.construction import ensure_wrapped_if_datetimelike
  from pandas.core.internals.array_manager import ArrayManager, NullArrayProxy
  from pandas.core.internals.blocks import ensure_block_shape, new_block_2d
  from pandas.core.internals.managers import BlockManager
label_desc: Use image node_id 13 for calling a global function with example usage: _combine_concat_plans(plans) and returns: retval