code: def transfer_multitask_l12_logistic_regression(
      fm_train=traindat, fm_test=testdat, label_train=label_traindat
  ):
      from shogun import BinaryLabels, Task, TaskGroup
  
      try:
          from shogun import MultitaskL12LogisticRegression
      except ImportError:
          print("MultitaskL12LogisticRegression not available")
          exit(0)
      import shogun as sg
  
      features = sg.create_features(hstack((traindat, traindat)))
      labels = BinaryLabels(hstack((label_train, label_train)))
  
      n_vectors = features.get_num_vectors()
      task_one = Task(0, n_vectors // 2)
      task_two = Task(n_vectors // 2, n_vectors)
      task_group = TaskGroup()
      task_group.append_task(task_one)
      task_group.append_task(task_two)
  
      mtlr = MultitaskL12LogisticRegression(
          0.1, 0.1, features, labels, task_group
      )
      mtlr.set_tolerance(1e-2)  # use 1e-2 tolerance
      mtlr.set_max_iter(10)
      mtlr.train()
      mtlr.set_current_task(0)
      out = mtlr.apply_regression().get_labels()
  
      return out
  
label_desc: Use image node_id 1 for calling a global function with example usage: transfer_multitask_l12_logistic_regression(fm_train, fm_test, label_train) and returns: out