docstr: Use both `op` and `pb` to get a summary, asserting equality.
  
  Returns:
    a `Summary` protocol buffer
docstr_tok: ["Use","both","`","op","`","and","`","pb","`","to","get","a","summary",",","asserting","equality",".","Returns",":","a","`","Summary","`","protocol","buffer"]
code: def compute_and_check_summary_pb(
      self,
      name,
      labels,
      predictions,
      num_thresholds,
      weights=None,
      display_name=None,
      description=None,
      feed_dict=None,
  ):
      """Use both `op` and `pb` to get a summary, asserting equality.
  
      Returns:
        a `Summary` protocol buffer
      """
      labels_tensor = tf.constant(labels)
      predictions_tensor = tf.constant(predictions)
      weights_tensor = None if weights is None else tf.constant(weights)
      op = summary.op(
          name=name,
          labels=labels_tensor,
          predictions=predictions_tensor,
          num_thresholds=num_thresholds,
          weights=weights_tensor,
          display_name=display_name,
          description=description,
      )
      pb = self.normalize_summary_pb(
          summary.pb(
              name=name,
              labels=labels,
              predictions=predictions,
              num_thresholds=num_thresholds,
              weights=weights,
              display_name=display_name,
              description=description,
          )
      )
      pb_via_op = self.normalize_summary_pb(
          self.pb_via_op(op, feed_dict=feed_dict)
      )
      self.assertProtoEquals(pb, pb_via_op)
      return pb
  
imports: import numpy
  import tensorflow
  from tensorboard.compat.proto import summary_pb2
  from tensorboard.plugins.pr_curve import metadata
  from tensorboard.plugins.pr_curve import summary
  from tensorboard.util import tensor_util
  from tensorboard.util import test_util
label_desc: Use image node_id 4 for calling the PrCurveTest obj's underlying member method code with example usage: obj.compute_and_check_summary_pb(name, labels, predictions, num_thresholds, weights, display_name, description, feed_dict) and returns: pb