code: def pad_z(pts, value=0.0):
      
      pts = np.asarray(pts)
      if pts.shape[-1] < 3:
          if len(pts.shape) < 2:
              return np.asarray((pts[0], pts[1], value), dtype=pts.dtype)
          pad_col = np.full(len(pts), value, dtype=pts.dtype)
          pts = np.asarray((pts.T[0], pts.T[1], pad_col)).T
      return pts
docs: Adds a Z component from `pts` if it is missing.
      The value defaults to `value` (0.0)