code: def svm_train(kernel, labels, C1, C2=None):
      """Trains a SVM with the given kernel"""
  
      num_threads = 1
  
      kernel.io.disable_progress()
      svm = LibSVM(C1, kernel, labels)
      if C2:
          svm.set_C(C1, C2)
      svm.parallel.set_num_threads(num_threads)
      svm.io.disable_progress()
      svm.train()
  
      return svm
  
file_path: shogun/applications/easysvm/tutpaper/svm_params.py
imports: import sys, os
  import numpy
  import shogun
  from shogun import GaussianKernel, LinearKernel, PolyKernel
  from shogun import RealFeatures, BinaryLabels
  from shogun import LibSVM
  from numpy import arange
  import matplotlib
  from matplotlib import pylab
label_desc: Use image node_id 3 for calling a global function with example usage: svm_train(kernel, labels, C1, C2) and returns: svm