code: def _periodic_knots(x, k):
      """Returns vector of nodes on a circle."""
      xc = cupy.copy(x)
      n = len(xc)
      if k % 2 == 0:
          dx = cupy.diff(xc)
          xc[1:-1] -= dx[:-1] / 2
      dx = cupy.diff(xc)
      t = cupy.zeros(n + 2 * k)
      t[k:-k] = xc
      for i in range(0, k):
          # filling first `k` elements in descending order
          t[k - i - 1] = t[k - i] - dx[-(i % (n - 1)) - 1]
          # filling last `k` elements in ascending order
          t[-k + i] = t[-k + i - 1] + dx[i % (n - 1)]
      return t
  
file_path: cupy/cupyx/scipy/interpolate/_bspline2.py
imports: import operator
  from numpy.core.multiarray import normalize_axis_index
  import cupy
  from cupyx.scipy import sparse
  from cupyx.scipy.sparse.linalg import spsolve
  from cupyx.scipy.interpolate._bspline import _get_module_func, INTERVAL_MODULE, D_BOOR_MODULE, BSpline
label_desc: Use image node_id 6 for calling a global function with example usage: _periodic_knots(x, k) and returns: t