code: def test_cosine_kernel():
      estimator = KernelSVC(kernel="cosine", random_state=1, gamma=2.0)
  
      estimator.fit(np.array([[1], [2]]), [1, 2])
  
      assembler = LightningSVMModelAssembler(estimator)
      actual = assembler.assemble()
  
      expected = utils._create_expected_svm_single_output_ast(
          estimator.coef_,
          estimator.intercept_,
          [
              utils._svm_cosine_kernel_ast(1.0),
              utils._svm_cosine_kernel_ast(1.0),
          ],
      )
  
      assert cmp_exprs(actual, expected)
  
file_path: m2cgen/tests/assemblers/test_svm_lightning.py
imports: import numpy
  from lightning.classification import KernelSVC
  from m2cgen import ast
  from m2cgen.assemblers import LightningSVMModelAssembler
  from tests.assemblers import utils
  from tests.utils import cmp_exprs
label_desc: Use image node_id 1 for calling a global function with example usage: test_cosine_kernel() without return types