docstr: Tests that sparse mode returns correct results.
docstr_tok: ["Tests","that","sparse","mode","returns","correct","results","."]
code: def test_knot_weights_sparse_mode_preset(
      self, positions, gt_weights, gt_shifts, degree, cyclical
  ):
      """Tests that sparse mode returns correct results."""
      weights, shifts = bspline.knot_weights(
          positions,
          num_knots=3,
          degree=degree,
          cyclical=cyclical,
          sparse_mode=True,
      )
  
      self.assertAllClose(weights, gt_weights)
      self.assertAllClose(shifts, gt_shifts)
  
file_path: graphics/tensorflow_graphics/math/interpolation/tests/bspline_test.py
imports: from absl.testing import parameterized
  import numpy
  from tensorflow_graphics.math.interpolation import bspline
  from tensorflow_graphics.util import test_case
label_desc: Use image node_id 6 for calling the BSplineTest obj's underlying member method code with example usage: obj.test_knot_weights_sparse_mode_preset(positions, gt_weights, gt_shifts, degree, cyclical) without return types