code: def test_nd_linear_interpolation_unspecified_shape():
      """Ensure that interpolation supports dynamic batch_size and
      num_points."""
  
      tp = _QuadraticPlusSinProblemND()
      (query_points, _, train_points, train_values) = tp.get_problem(
          dtype="float64"
      )
  
      feature_dim = query_points.shape[-1]
      value_dim = train_values.shape[-1]
  
      order = 1
      reg_weight = 0.01
  
      # Get concrete functions such that the batch size, number of train points,
      # and number of query points are not known at graph construction time.
      fn = tf.function(interpolate_spline).get_concrete_function(
          tf.TensorSpec(
              shape=[None, None, feature_dim], dtype=train_points.dtype
          ),
          tf.TensorSpec(
              shape=[None, None, value_dim], dtype=train_values.dtype
          ),
          tf.TensorSpec(
              shape=[None, None, feature_dim], dtype=query_points.dtype
          ),
          order,
          reg_weight,
      )
  
      target_interpolation = tp.HARDCODED_QUERY_VALUES[
          (order, reg_weight)
      ]
      target_interpolation = np.array(target_interpolation)
  
      interp_val = fn(train_points, train_values, query_points)
  
      np.testing.assert_allclose(
          interp_val[0, :, 0], target_interpolation
      )
  
file_path: addons/tensorflow_addons/image/tests/interpolate_spline_test.py
imports: import numpy
  import pytest
  from scipy import interpolate
  import tensorflow
  from tensorflow_addons.image import interpolate_spline
label_desc: Use image node_id 4 for calling a global function with example usage: test_nd_linear_interpolation_unspecified_shape() without return types