docstr: Pass `pb`'s `TensorProto` through a marshalling roundtrip.
  
  `TensorProto`s can be equal in value even if they are not
  identical in representation, because data can be stored in
  either the `tensor_content` field or the `${dtype}_value` field.
  This normalization ensures a canonical form, and should be used
  before comparing two `Summary`s for equality.
docstr_tok: ["Pass","`","pb","`","'s","`","TensorProto","`","through","a","marshalling","roundtrip",".","`","TensorProto","`","s","can","be","equal","in","value","even","if","they","are","not","identical","in","representation",",","because","data","can","be","stored","in","either","the","`","tensor_content","`","field","or","the","`","$","{","dtype","}","_value","`","field",".","This","normalization","ensures","a","canonical","form",",","and","should","be","used","before","comparing","two","`","Summary","`","s","for","equality","."]
code: def normalize_summary_pb(self, pb):
      """Pass `pb`'s `TensorProto` through a marshalling roundtrip.
  
      `TensorProto`s can be equal in value even if they are not
      identical in representation, because data can be stored in
      either the `tensor_content` field or the `${dtype}_value` field.
      This normalization ensures a canonical form, and should be used
      before comparing two `Summary`s for equality.
      """
      result = summary_pb2.Summary()
      if not isinstance(pb, summary_pb2.Summary):
          # pb can come from `pb_via_op` which creates a TB Summary.
          pb = test_util.ensure_tb_summary_proto(pb)
      result.MergeFrom(pb)
      for value in result.value:
          if value.HasField("tensor"):
              new_tensor = tensor_util.make_tensor_proto(
                  tensor_util.make_ndarray(value.tensor)
              )
              value.ClearField("tensor")
              value.tensor.MergeFrom(new_tensor)
      return result
  
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 3 for calling the PrCurveTest obj's underlying member method code with example usage: obj.normalize_summary_pb(pb) and returns: result