code: def test_kochanek_spline():
      theta = np.linspace(-4 * np.pi, 4 * np.pi, 100)
      z = np.linspace(-2, 2, 100)
      r = z**2 + 1
      x = r * np.sin(theta)
      y = r * np.cos(theta)
  
      tension = np.random.default_rng().random(3)
      bias = np.random.default_rng().random(3)
      continuity = np.random.default_rng().random(3)
  
      n_points = 1000
      points = np.column_stack((x, y, z))
      kochanek_spline = pv.KochanekSpline(
          points, tension, bias, continuity, n_points
      )
      assert kochanek_spline.n_points == n_points
  
      # test default
      kochanek_spline = pv.KochanekSpline(points)
      assert kochanek_spline.n_points == points.shape[0]
  
      # test invalid
      with pytest.raises(ValueError, match="tension"):
          kochanek_spline = pv.KochanekSpline(
              points, [-2, 0, 0], bias, continuity, n_points
          )
      with pytest.raises(ValueError, match="bias"):
          kochanek_spline = pv.KochanekSpline(
              points, tension, [-2, 0, 0], continuity, n_points
          )
      with pytest.raises(ValueError, match="continuity"):
          kochanek_spline = pv.KochanekSpline(
              points, tension, bias, [-2, 0, 0], n_points
          )
  
imports: import numpy
  import pytest
  import vtk
  import pyvista
  from pyvista.core.errors import PyVistaDeprecationWarning
label_desc: Use image node_id 2 for calling a global function with example usage: test_kochanek_spline() without return types