code: def concatenate_join_units(join_units, concat_axis, copy):
      """
      Concatenate values from several join units along selected axis.
      """
      if concat_axis == 0 and len(join_units) > 1:
          # Concatenating join units along ax0 is handled in _merge_blocks.
          raise AssertionError("Concatenating join units along axis0")
  
      empty_dtype, upcasted_na = get_empty_dtype_and_na(join_units)
  
      to_concat = [
          ju.get_reindexed_values(
              empty_dtype=empty_dtype, upcasted_na=upcasted_na
          )
          for ju in join_units
      ]
  
      if len(to_concat) == 1:
          # Only one block, nothing to concatenate.
          concat_values = to_concat[0]
          if copy:
              if isinstance(concat_values, np.ndarray):
                  # non-reindexed (=not yet copied) arrays are made into a view
                  # in JoinUnit.get_reindexed_values
                  if concat_values.base is not None:
                      concat_values = concat_values.copy()
              else:
                  concat_values = concat_values.copy()
      else:
          concat_values = _concat._concat_compat(
              to_concat, axis=concat_axis
          )
  
      return concat_values
  
imports: from collections import defaultdict
  import copy
  import numpy
  from pandas._libs import internals, tslibs
  from pandas.util._decorators import cache_readonly
  from pandas.core.dtypes.cast import maybe_promote
  from pandas.core.dtypes.common import _get_dtype, is_categorical_dtype, is_datetime64_dtype, is_datetime64tz_dtype, is_extension_array_dtype, is_float_dtype, is_numeric_dtype, is_sparse, is_timedelta64_dtype
  import pandas.core.dtypes.concat
  from pandas.core.dtypes.missing import isna
  import pandas.core.algorithms
label_desc: Use image node_id 2 for calling a global function with example usage: concatenate_join_units(join_units, concat_axis, copy) and returns: concat_values