code: def test_deriv_shapes():
      def krogh_deriv(x, y, axis=0):
          return KroghInterpolator(x, y, axis).derivative
  
      def pchip_deriv(x, y, axis=0):
          return pchip(x, y, axis).derivative()
  
      def pchip_deriv2(x, y, axis=0):
          return pchip(x, y, axis).derivative(2)
  
      def pchip_antideriv(x, y, axis=0):
          return pchip(x, y, axis).derivative()
  
      def pchip_antideriv2(x, y, axis=0):
          return pchip(x, y, axis).derivative(2)
  
      def pchip_deriv_inplace(x, y, axis=0):
          class P(PchipInterpolator):
              def __call__(self, x):
                  return PchipInterpolator.__call__(self, x, 1)
  
              pass
  
          return P(x, y, axis)
  
      def akima_deriv(x, y, axis=0):
          return Akima1DInterpolator(x, y, axis).derivative()
  
      def akima_antideriv(x, y, axis=0):
          return Akima1DInterpolator(x, y, axis).antiderivative()
  
      def cspline_deriv(x, y, axis=0):
          return CubicSpline(x, y, axis).derivative()
  
      def cspline_antideriv(x, y, axis=0):
          return CubicSpline(x, y, axis).antiderivative()
  
      def bspl_deriv(x, y, axis=0):
          return make_interp_spline(x, y, axis=axis).derivative()
  
      def bspl_antideriv(x, y, axis=0):
          return make_interp_spline(x, y, axis=axis).antiderivative()
  
      for ip in [
          krogh_deriv,
          pchip_deriv,
          pchip_deriv2,
          pchip_deriv_inplace,
          pchip_antideriv,
          pchip_antideriv2,
          akima_deriv,
          akima_antideriv,
          cspline_deriv,
          cspline_antideriv,
          bspl_deriv,
          bspl_antideriv,
      ]:
          for s1 in SHAPES:
              for s2 in SHAPES:
                  for axis in range(-len(s2), len(s2)):
                      check_shape(ip, s1, s2, (), axis)
  
imports: import warnings
  import io
  import numpy
  from numpy.testing import assert_almost_equal, assert_array_equal, assert_array_almost_equal, assert_allclose, assert_equal, assert_
  from pytest import raises
  from scipy.interpolate import KroghInterpolator, krogh_interpolate, BarycentricInterpolator, barycentric_interpolate, approximate_taylor_polynomial, CubicHermiteSpline, pchip, PchipInterpolator, pchip_interpolate, Akima1DInterpolator, CubicSpline, make_interp_spline
label_desc: Use image node_id 4 for calling a global function with example usage: test_deriv_shapes() and returns: KroghInterpolator, pchip, pchip, pchip, pchip, P, Akima1DInterpolator, Akima1DInterpolator, CubicSpline, CubicSpline, make_interp_spline, make_interp_spline, PchipInterpolator