code: def _dist_wrapper(dist_matrix, X, Y, s, XX_all=None, XY_all=None):
      """Write in-place to a slice of a distance matrix."""
      for i in range(s.start, s.stop):
          dist_matrix[i] = boss_distance(X, Y, i, XX_all, XY_all)
  
imports: from copy import copy
  from itertools import compress
  import numpy
  from joblib import Parallel, effective_n_jobs
  from sklearn.metrics import pairwise
  from sklearn.utils import check_random_state, gen_even_slices
  from sklearn.utils.extmath import safe_sparse_dot
  from sklearn.utils.fixes import delayed
  from sklearn.utils.sparsefuncs_fast import csr_row_norms
  from sklearn.utils.validation import _num_samples
  from sktime.classification.base import BaseClassifier
  from sktime.transformations.panel.dictionary_based import SFAFast
  from sktime.utils.validation.panel import check_X_y
label_desc: Use image node_id 1 for calling a global function with example usage: _dist_wrapper(dist_matrix, X, Y, s, XX_all, XY_all) without return types