code: def minkowski(x, y, p=2):
      r"""Minkowski distance.
  
      .. math::
          D(x, y) = \left(\sum_i |x_i - y_i|^p\right)^{\frac{1}{p}}
  
      This is a general distance. For p=1 it is equivalent to
      manhattan distance, for p=2 it is Euclidean distance, and
      for p=infinity it is Chebyshev distance. In general it is better
      to use the more specialised functions for those distances.
      """
      result = 0.0
      for i in range(x.shape[0]):
          result += (np.abs(x[i] - y[i])) ** p
  
      return result ** (1.0 / p)
  
imports: import numpy
  import numba
  from pynndescent.optimal_transport import allocate_graph_structures, initialize_graph_structures, initialize_supply, initialize_cost, network_simplex_core, total_cost, ProblemStatus, sinkhorn_transport_plan
label_desc: Use image node_id 6 for calling a global function with example usage: minkowski(x, y, p) and returns: unknown