code: def test_add_pr_curve():
      def check_add_pr_curve(labels, predictions, num_thresholds):
          with SummaryWriter(_LOGDIR) as sw:
              sw.add_pr_curve(
                  tag="test_add_pr_curve",
                  labels=labels,
                  predictions=predictions,
                  num_thresholds=num_threshodls,
              )
          check_event_file_and_remove_logdir()
  
      shape = (100,)
      predictions = mx.nd.uniform(low=0.0, high=1.0, shape=shape)
      labels = mx.nd.uniform(low=0, high=2, shape=shape).astype("int32")
      num_threshodls = 100
      check_add_pr_curve(labels, predictions, num_threshodls)
      check_add_pr_curve(labels.asnumpy(), predictions, num_threshodls)
      check_add_pr_curve(
          labels.asnumpy(), predictions.asnumpy(), num_threshodls
      )
  
imports: import shutil
  from mxboard import SummaryWriter
  from mxboard.utils import _make_metadata_tsv, make_image_grid, _make_sprite_image
  from mxboard.utils import _add_embedding_config, _save_embedding_tsv, _get_embedding_dir
  from mxboard.summary import _get_nodes_from_symbol, _net2pb
  from mxboard.proto.node_def_pb2 import NodeDef
  from mxboard.proto.attr_value_pb2 import AttrValue
  from mxboard.proto.graph_pb2 import GraphDef
  from mxboard.proto.versions_pb2 import VersionDef
  from mxnet.test_utils import *
  from mxnet.gluon import nn
  import mxnet
  from common import with_seed, setup_module
  from nose.tools import make_decorator
label_desc: Use image node_id 28 for calling a global function with example usage: test_add_pr_curve() without return types