code: def test_save_load_confidence_report():
      """
      Test that a confidence report can be loaded and saved.
      """
      report = ConfidenceReport()
      num_examples = 2
      clean_correctness = np.zeros((num_examples,), dtype=np.bool)
      clean_confidence = np.zeros((num_examples,), dtype=np.float32)
      adv_correctness = clean_correctness.copy()
      adv_confidence = clean_confidence.copy()
      report["clean"] = ConfidenceReportEntry(
          clean_correctness, clean_confidence
      )
      report["adv"] = ConfidenceReportEntry(
          adv_correctness, adv_confidence
      )
      report.completed = True
      filepath = ".test_confidence_report.joblib"
      serial.save(filepath, report)
      report = serial.load(filepath)
  
file_path: cleverhans/cleverhans_v3.1.0/tests_tf/test_confidence_report.py
imports: import numpy
  import tensorflow
  from cleverhans.attacks import Noise
  from cleverhans.attack_bundling import AttackConfig
  from cleverhans.attack_bundling import bundle_attacks
  from cleverhans.attack_bundling import Misclassify
  from cleverhans.confidence_report import ConfidenceReport
  from cleverhans.confidence_report import ConfidenceReportEntry
  from cleverhans.confidence_report import make_confidence_report_bundled
  from cleverhans.devtools.mocks import SimpleDataset
  from cleverhans.picklable_model import MLP, Linear
  from cleverhans import serial
label_desc: Use image node_id 3 for calling a global function with example usage: test_save_load_confidence_report() without return types