code: def dist(self, x1, x2):
          
          if self.exponent == 2.0:
              return float(np.sqrt(self.const) * _norm_default(x1 - x2))
          elif self.exponent == float('inf'):
              return float(self.const * _pnorm_default(x1 - x2, self.exponent))
          else:
              return float((self.const ** (1 / self.exponent) *
                            _pnorm_default(x1 - x2, self.exponent)))
docs: Return the weighted distance between ``x1`` and ``x2``.
  
          Parameters
          ----------
          x1, x2 : `NumpyTensor`
              Tensors whose mutual distance is calculated.
  
          Returns
          -------
          dist : float
              The distance between the tensors.