code: def evaluate_multi_label(active_learner, train, test):
      y_pred = active_learner.classifier.predict(train)
      y_pred_test = active_learner.classifier.predict(test)
  
      # https://github.com/scikit-learn/scikit-learn/issues/18611
      print(
          "Train accuracy: {:.2f}".format(
              f1_score(
                  y_pred.toarray(), train.y.toarray(), average="micro"
              )
          )
      )
      print(
          "Test accuracy: {:.2f}".format(
              f1_score(
                  y_pred_test.toarray(),
                  test.y.toarray(),
                  average="micro",
              )
          )
      )
      print("---")
  
label_desc: Use image node_id 2 for calling a global function with example usage: evaluate_multi_label(active_learner, train, test) without return types