code: def _get_xy(points):
      """extract the list of positions and the list of values for given points"""
      from numpy import asarray
  
      if hasattr(points, "coords"):
          x = points.coords
          y = points.values
      elif len(asarray(points).shape) >= 1:
          x = [p.position for p in points]
          y = [p.value for p in points]
      else:
          x = points.position
          y = points.value
      return x, y
  
file_path: mystic/mystic/math/distance.py
label_desc: Use image node_id 5 for calling a global function with example usage: _get_xy(points) and returns: x,  y