code: def _reduce_and_concatenate(data1, data2, chunksize):
      nb_subj = len(data1)
      rset1 = []
      rset2 = []
      for s in range(nb_subj):
          rdata1, rdata2 = _jointly_reduce_data(
              data1[s], data2[s], chunksize / nb_subj
          )
          rset1.append(rdata1)
          rset2.append(rdata2)
      rset1 = np.concatenate(rset1)
      rset2 = np.concatenate(rset2)
      return rset1, rset2
  
file_path: nipy/nipy/labs/spatial_models/hierarchical_parcellation.py
imports: from warnings import warn
  import numpy
  from numpy.random import rand
  from nipy.algorithms.clustering.utils import kmeans, voronoi
  from nipy.algorithms.graph.field import Field
  from nipy.algorithms.graph.graph import wgraph_from_coo_matrix
  from .parcellation import MultiSubjectParcellation
label_desc: Use image node_id 2 for calling a global function with example usage: _reduce_and_concatenate(data1, data2, chunksize) and returns: rset1,  rset2