code: def _not_a_knot(x, k):
      """Given data x, construct the knot vector w/ not-a-knot BC.
      cf de Boor, XIII(12)."""
      x = np.asarray(x)
      if k % 2 != 1:
          raise ValueError("Odd degree for now only. Got %s." % k)
  
      m = (k - 1) // 2
      t = x[m + 1 : -m - 1]
      t = np.r_[(x[0],) * (k + 1), t, (x[-1],) * (k + 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 3 for calling a global function with example usage: _not_a_knot(x, k) and returns: t