code: def kernel_sparse_linear(
      fm_train_real=traindat, fm_test_real=testdat, scale=1.1
  ):
      from shogun import SparseRealFeatures
      import shogun as sg
  
      feats_train = SparseRealFeatures(fm_train_real)
      feats_test = SparseRealFeatures(fm_test_real)
  
      kernel = sg.create_kernel("LinearKernel")
      kernel.set_normalizer(
          sg.create_kernel_normalizer(
              "AvgDiagKernelNormalizer", scale=scale
          )
      )
      kernel.init(feats_train, feats_train)
      km_train = kernel.get_kernel_matrix()
  
      kernel.init(feats_train, feats_test)
      km_test = kernel.get_kernel_matrix()
      return km_train, km_test, kernel
  
label_desc: Use image node_id 1 for calling a global function with example usage: kernel_sparse_linear(fm_train_real, fm_test_real, scale) and returns: km_train,  km_test,  kernel