code: def _pairwise_path(x, y, metric):
      pw_matrix = pairwise_distance(x, y, metric=metric)
      path = []
      for i in range(pw_matrix.shape[0]):
          for j in range(pw_matrix.shape[1]):
              if i == j:
                  path.append((i, j))
      return path, pw_matrix.trace(), pw_matrix
  
imports: import numpy
  from sktime.distances._distance import distance_alignment_path, pairwise_distance
  from sktime.utils.validation._dependencies import _check_soft_dependencies
label_desc: Use image node_id 2 for calling a global function with example usage: _pairwise_path(x, y, metric) and returns: path,  pw_matrix,  pw_matrix