code: def so_multiclass(
      fm_train_real=traindat, label_train_multiclass=label_traindat
  ):
      try:
          from shogun import RealFeatures
          from shogun import (
              MulticlassModel,
              MulticlassSOLabels,
              PrimalMosekSOSVM,
              RealNumber,
          )
      except ImportError:
          print("Mosek not available")
          return
  
      labels = MulticlassSOLabels(label_train_multiclass)
      features = sg.create_features(fm_train_real.T)
  
      model = MulticlassModel(features, labels)
      sosvm = PrimalMosekSOSVM(model, labels)
      sosvm.train()
  
      out = sosvm.apply()
      count = 0
      for i in xrange(out.get_num_labels()):
          yi_pred = RealNumber.obtain_from_generic(out.get_label(i))
          if yi_pred.value == label_train_multiclass[i]:
              count = count + 1
  
      print(
          "Correct classification rate: %0.2f"
          % (100.0 * count / out.get_num_labels())
      )
  
label_desc: Use image node_id 2 for calling a global function with example usage: so_multiclass(fm_train_real, label_train_multiclass) without return types