code: def _find_clusters_1dir_parts(
      x, x_in, adjacency, max_step, partitions, t_power, ndimage
  ):
      """Deal with partitions, and pass the work to _find_clusters_1dir."""
      if partitions is None:
          clusters, sums = _find_clusters_1dir(
              x, x_in, adjacency, max_step, t_power, ndimage
          )
      else:
          # cluster each partition separately
          clusters = list()
          sums = list()
          for p in range(np.max(partitions) + 1):
              x_i = np.logical_and(x_in, partitions == p)
              out = _find_clusters_1dir(
                  x, x_i, adjacency, max_step, t_power, ndimage
              )
              clusters += out[0]
              sums.append(out[1])
          sums = np.concatenate(sums)
      return clusters, sums
  
imports: import numpy
  from scipy import ndimage, sparse
  from scipy.sparse.csgraph import connected_components
  from scipy.stats import f
  from scipy.stats import t
  from ..fixes import has_numba, jit
  from ..parallel import parallel_func
  from ..source_estimate import MixedSourceEstimate, SourceEstimate, VolSourceEstimate
  from ..source_space import SourceSpaces
  from ..utils import ProgressBar, _check_option, _pl, _validate_type, check_random_state, logger, split_list, verbose, warn
  from .parametric import f_oneway, ttest_1samp_no_p
label_desc: Use image node_id 14 for calling a global function with example usage: _find_clusters_1dir_parts(x, x_in, adjacency, max_step, partitions, t_power, ndimage) and returns: clusters,  sums