code: def classifier_larank(
      num_vec,
      num_class,
      distance,
      C=0.9,
      num_threads=1,
      num_iter=5,
      seed=1,
  ):
      from shogun import MulticlassLabels
      from shogun import LaRank
      from shogun import Math_init_random
      import shogun as sg
  
      # reproducible results
      Math_init_random(seed)
      random.seed(seed)
  
      # generate some training data where each class pair is linearly separable
      label_train = array(
          [mod(x, num_class) for x in range(num_vec)], dtype="float64"
      )
      label_test = array(
          [mod(x, num_class) for x in range(num_vec)], dtype="float64"
      )
      fm_train = array(random.randn(num_class, num_vec))
      fm_test = array(random.randn(num_class, num_vec))
      for i in range(len(label_train)):
          fm_train[int(label_train[i]), i] += distance
          fm_test[int(label_test[i]), i] += distance
  
      feats_train = sg.create_features(fm_train)
      feats_test = sg.create_features(fm_test)
  
      kernel = sg.create_kernel("GaussianKernel", width=1)
  
      epsilon = 1e-5
      labels = MulticlassLabels(label_train)
  
      svm = LaRank(C, kernel, labels)
      # svm.set_tau(1e-3)
      svm.set_batch_mode(False)
      # svm.io.enable_progress()
      svm.set_epsilon(epsilon)
      svm.train(feats_train)
      out = svm.apply(feats_test).get_labels()
      predictions = svm.apply()
      return predictions, svm, predictions.get_labels()
  
label_desc: Use image node_id 1 for calling a global function with example usage: classifier_larank(num_vec, num_class, distance, C, num_threads, num_iter, seed) and returns: predictions,  svm,  predictions