code: def test_clasp_dense():
      """Tests ClaSP dense segmentation.
  
      Check if the predicted segmentation matches.
      """
      # load the test dataset
      ts, period_size, cps = load_gun_point_segmentation()
  
      # compute a ClaSP segmentation
      clasp = ClaSPSegmentation(period_size, n_cps=1, fmt="dense")
      clasp.fit(ts)
      segmentation = clasp.predict(ts)
      scores = clasp.predict_scores(ts)
  
      assert len(segmentation) == 2 and segmentation[0].right == 893
      assert np.argmax(scores) == 893
  
imports: import numpy
  import pytest
  from sktime.annotation.clasp import ClaSPSegmentation
  from sktime.datasets import load_gun_point_segmentation
  from sktime.tests.test_switch import run_test_for_class
label_desc: Use image node_id 2 for calling a global function with example usage: test_clasp_dense() without return types