code: def evaluation_contingencytableevaluation(ground_truth, predicted):
      from shogun import BinaryLabels
      import shogun as sg
  
      ground_truth_labels = BinaryLabels(ground_truth)
      predicted_labels = BinaryLabels(predicted)
  
      base_evaluator = sg.create_evaluation(
          "ContingencyTableEvaluation"
      )
      base_evaluator.evaluate(predicted_labels, ground_truth_labels)
  
      evaluator = sg.create_evaluation("AccuracyMeasure")
      accuracy = evaluator.evaluate(
          predicted_labels, ground_truth_labels
      )
  
      evaluator = sg.create_evaluation("ErrorRateMeasure")
      errorrate = evaluator.evaluate(
          predicted_labels, ground_truth_labels
      )
  
      evaluator = sg.create_evaluation("BALMeasure")
      bal = evaluator.evaluate(predicted_labels, ground_truth_labels)
  
      evaluator = sg.create_evaluation("WRACCMeasure")
      wracc = evaluator.evaluate(predicted_labels, ground_truth_labels)
  
      evaluator = sg.create_evaluation("F1Measure")
      f1 = evaluator.evaluate(predicted_labels, ground_truth_labels)
  
      evaluator = sg.create_evaluation("CrossCorrelationMeasure")
      crosscorrelation = evaluator.evaluate(
          predicted_labels, ground_truth_labels
      )
  
      evaluator = sg.create_evaluation("RecallMeasure")
      recall = evaluator.evaluate(predicted_labels, ground_truth_labels)
  
      evaluator = sg.create_evaluation("PrecisionMeasure")
      precision = evaluator.evaluate(
          predicted_labels, ground_truth_labels
      )
  
      evaluator = sg.create_evaluation("SpecificityMeasure")
      specificity = evaluator.evaluate(
          predicted_labels, ground_truth_labels
      )
  
      return (
          accuracy,
          errorrate,
          bal,
          wracc,
          f1,
          crosscorrelation,
          recall,
          precision,
          specificity,
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: evaluation_contingencytableevaluation(ground_truth, predicted) and returns: accuracy,  errorrate,  bal,  wracc,  f1,  crosscorrelation,  recall,  precision,  specificity