code: def lipschitz_distance(L, points1, points2, **kwds):
      """calculate the lipschitz distance between two sets of datapoints
  
      Args:
          L (list): a list of lipschitz constants
          points1 (mystic.math.legacydata.dataset): a dataset
          points2 (mystic.math.legacydata.dataset): a second dataset
          tol (float, default=0.0): maximum acceptable deviation from shortness
          cutoff (float, default=tol): zero out distances less than cutoff
  
      Returns:
          a list of lipschitz distances
  
      Notes:
          Both *points1* and *points2* can be a ``mystic.math.legacydata.dataset``,
          or a list of ``mystic.math.legacydata.datapoint`` objects, or a list of
          ``lipschitzcone.vertex`` objects (from ``mystic.math.legacydata``).
          *cutoff* takes a float or a boolean, where ``cutoff=True`` will set the
          value of *cutoff* to the default. Typically, the value of *cutoff* is
          *tol*, 0.0, or None.
  
          Each point x,y can be thought to have an associated double-cone with slope
          equal to the lipschitz constant. Shortness with respect to another point is
          defined by the first point not being inside the cone of the second. We can
          allow for some error in shortness, a short tolerance *tol*, for which the
          point x,y is some acceptable y-distance inside the cone. While very tightly
          related, *cutoff* and *tol* play distinct roles; *tol* is subtracted from
          calculation of the lipschitz_distance, while *cutoff* zeros out the value
          of any element less than the *cutoff*."""
      # FIXME: merge with lipschitz cone (distance/contains)
      x, y = _get_xy(points1)
      xp, yp = _get_xy(points2)
  
      # get tolerance in y
      tol = kwds.pop("tol", 0.0)
      cutoff = (
          tol  # default is to zero out distances less than tolerance
      )
      if "cutoff" in kwds:
          cutoff = kwds.pop("cutoff")
      if cutoff is True:
          cutoff = tol
      elif cutoff is False:
          cutoff = None
  
      # calculate the distance matrix
      md = absolute_distance(y, yp) - max(0.0, tol)
      lm = lipschitz_metric(L, x, xp)
      d = md - lm
      # zero-out all distances less than tolerated
      return infeasibility(d, cutoff)
  
file_path: mystic/mystic/math/distance.py
label_desc: Use image node_id 13 for calling a global function with example usage: lipschitz_distance(L, points1, points2) and returns: infeasibility