code: def draw_pr_curve(
      precision,
      recall,
      iou=0.5,
      out_dir="pr_curve",
      file_name="precision_recall_curve.jpg",
  ):
      if not os.path.exists(out_dir):
          os.makedirs(out_dir)
      output_path = os.path.join(out_dir, file_name)
      try:
          import matplotlib.pyplot as plt
      except Exception as e:
          logger.error(
              "Matplotlib not found, plaese install matplotlib."
              "for example: `pip install matplotlib`."
          )
          raise e
      plt.cla()
      plt.figure("P-R Curve")
      plt.title("Precision/Recall Curve(IoU={})".format(iou))
      plt.xlabel("Recall")
      plt.ylabel("Precision")
      plt.grid(True)
      plt.plot(recall, precision)
      plt.savefig(output_path)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import sys
  import numpy
  import itertools
  import paddle
  from ppdet.modeling.rbox_utils import poly2rbox_np
  from ppdet.utils.logger import setup_logger
label_desc: Use image node_id 1 for calling a global function with example usage: draw_pr_curve(precision, recall, iou, out_dir, file_name) without return types