code: def minkowski_distance_p(x, y, p=2):
      """
      Compute the p-th power of the L**p distance between two arrays.
  
      For efficiency, this function computes the L**p distance but does
      not extract the pth root. If `p` is 1 or infinity, this is equal to
      the actual L**p distance.
  
      Parameters
      ----------
      x : (M, K) array_like
          Input array.
      y : (N, K) array_like
          Input array.
      p : float, 1 <= p <= infinity
          Which Minkowski p-norm to use.
  
      Examples
      --------
      >>> from scipy.spatial import minkowski_distance_p
      >>> minkowski_distance_p([[0,0],[0,0]], [[1,1],[0,1]])
      array([2, 1])
  
      """
      x = np.asarray(x)
      y = np.asarray(y)
      if p == np.inf:
          return np.amax(np.abs(y - x), axis=-1)
      elif p == 1:
          return np.sum(np.abs(y - x), axis=-1)
      else:
          return np.sum(np.abs(y - x) ** p, axis=-1)
  
imports: from __future__ import division, print_function, absolute_import
  import sys
  import numpy
  from heapq import heappush, heappop
  import scipy.sparse
label_desc: Use image node_id 1 for calling a global function with example usage: minkowski_distance_p(x, y, p) and returns: np, np, np