code: def _cosine_kernel(self, support_vector):
      support_vector_norm = np.linalg.norm(support_vector)
      if support_vector_norm == 0.0:
          support_vector_norm = 1.0
      feature_norm = ast.SqrtExpr(
          utils.apply_op_to_expressions(
              ast.BinNumOpType.ADD,
              *[
                  utils.mul(ast.FeatureRef(i), ast.FeatureRef(i))
                  for i in range(len(support_vector))
              ],
          ),
          to_reuse=True,
      )
      safe_feature_norm = ast.IfExpr(
          utils.eq(feature_norm, ast.NumVal(0.0)),
          ast.NumVal(1.0),
          feature_norm,
      )
      kernel = self._linear_kernel(support_vector / support_vector_norm)
      kernel = utils.div(kernel, safe_feature_norm)
      return kernel
  
imports: import numpy
  from m2cgen import ast
  from m2cgen.assemblers import utils
  from m2cgen.assemblers.base import ModelAssembler
label_desc: Use image node_id 7 for calling the LightningSVMModelAssembler obj's underlying member method code with example usage: obj._cosine_kernel(support_vector) and returns: kernel