code: def _concat_nested_arrays(arrs, cells_as_numpy=False):
      """Nest tabular arrays from nested list.
  
      Helper function to nest tabular arrays from nested list of arrays.
  
      Parameters
      ----------
      arrs : list of numpy arrays
          Arrays must have the same number of rows, but can have varying
          number of columns.
  
      cells_as_numpy : bool, default = False
          If True, then nested cells contain NumPy array
          If False, then nested cells contain pandas Series
  
      Returns
      -------
      Xt : pandas DataFrame
          Transformed dataframe with nested column for each input array.
      """
      if cells_as_numpy:
          Xt = pd.DataFrame(
              np.column_stack(
                  [
                      pd.Series([np.array(vals) for vals in interval])
                      for interval in arrs
                  ]
              )
          )
      else:
          Xt = pd.DataFrame(
              np.column_stack(
                  [
                      pd.Series([pd.Series(vals) for vals in interval])
                      for interval in arrs
                  ]
              )
          )
      return Xt
  
imports: import numpy
  import pandas
  from sktime.datatypes._convert_utils._coerce import _coerce_df_dtypes
  from sktime.datatypes._convert_utils._convert import _extend_conversions
  from sktime.datatypes._panel._registry import MTYPE_LIST_PANEL
  from sktime.utils.pandas import df_map
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 16 for calling a global function with example usage: _concat_nested_arrays(arrs, cells_as_numpy) and returns: Xt