code: def _periodic_knots(x, k):
      """
      returns vector of nodes on circle
      """
      xc = np.copy(x)
      n = len(xc)
      if k % 2 == 0:
          dx = np.diff(xc)
          xc[1:-1] -= dx[:-1] / 2
      dx = np.diff(xc)
      t = np.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
  
imports: import operator
  import numpy
  from numpy.core.multiarray import normalize_axis_index
  from scipy.linalg import get_lapack_funcs, LinAlgError, cholesky_banded, cho_solve_banded, solve, solve_banded
  from .None import _bspl
  from .None import _fitpack_impl
  from .None import _fitpack
  from scipy._lib._util import prod
label_desc: Use image node_id 8 for calling a global function with example usage: _periodic_knots(x, k) and returns: t