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
  from math import prod
  import numpy
  from scipy._lib._util import normalize_axis_index
  from scipy.linalg import get_lapack_funcs, LinAlgError, cholesky_banded, cho_solve_banded, solve, solve_banded
  from scipy.optimize import minimize_scalar
  from .None import _bspl
  from .None import _fitpack_impl
  from scipy.sparse import csr_array
  from scipy.special import poch
  from itertools import combinations
label_desc: Use image node_id 10 for calling a global function with example usage: _periodic_knots(x, k) and returns: t