code: def _concatenate(arrays, axis=0):
      out = np.ma.concatenate(arrays, axis=axis)
      fill_values = [
          i.fill_value for i in arrays if hasattr(i, "fill_value")
      ]
      if any(isinstance(f, np.ndarray) for f in fill_values):
          raise ValueError(
              "Dask doesn't support masked array's with non-scalar `fill_value`s"
          )
      if fill_values:
          # If all the fill_values are the same copy over the fill value
          fill_values = np.unique(fill_values)
          if len(fill_values) == 1:
              out.fill_value = fill_values[0]
      return out
  
imports: from __future__ import annotations
  import math
  import numpy
  from dask.array import chunk
  from dask.array.core import Array
  from dask.array.dispatch import concatenate_lookup, divide_lookup, einsum_lookup, empty_lookup, nannumel_lookup, numel_lookup, percentile_lookup, tensordot_lookup, to_cupy_dispatch, to_numpy_dispatch
  from dask.array.numpy_compat import divide
  from dask.array.numpy_compat import ma_divide
  from dask.array.percentile import _percentile
  from dask.backends import CreationDispatch, DaskBackendEntrypoint
label_desc: Use image node_id 2 for calling a global function with example usage: _concatenate(arrays, axis) and returns: out