code: def _parallel_pairwise(X, Y, func, n_jobs, **kwds):
      """Break the pairwise matrix in n_jobs even slices
      and compute them in parallel"""
      if n_jobs < 0:
          n_jobs = max(cpu_count() + 1 + n_jobs, 1)
  
      if Y is None:
          Y = X
  
      if n_jobs == 1:
          # Special case to avoid picklability checks in delayed
          return func(X, Y, **kwds)
  
      # TODO: in some cases, backend='threading' may be appropriate
      fd = delayed(func)
      ret = Parallel(n_jobs=n_jobs, verbose=0)(
          fd(X, Y[s], **kwds)
          for s in gen_even_slices(Y.shape[0], n_jobs)
      )
  
      return np.hstack(ret)
  
imports: import itertools
  import numpy
  from scipy.spatial import distance
  from scipy.sparse import csr_matrix
  from scipy.sparse import issparse
  from ..utils import check_array
  from ..utils import gen_even_slices
  from ..utils import gen_batches
  from ..utils.fixes import partial
  from ..utils.extmath import row_norms, safe_sparse_dot
  from ..preprocessing import normalize
  from ..externals.joblib import Parallel
  from ..externals.joblib import delayed
  from ..externals.joblib import cpu_count
  from .pairwise_fast import _chi2_kernel_fast, _sparse_manhattan
label_desc: Use image node_id 22 for calling a global function with example usage: _parallel_pairwise(X, Y, func, n_jobs) and returns: np, func