class_docstr: Unit tests for the UploadStats class.
class_docstr_tok: ["Unit","tests","for","the","UploadStats","class","."]
code: def testUploadedSummaryWithTensorsAndBlobs(self):
      stats = upload_tracker.UploadStats()
      stats.add_scalars(1234)
      stats.add_tensors(
          num_tensors=50,
          num_tensors_skipped=10,
          tensor_bytes=2000,
          tensor_bytes_skipped=1800,
      )
      stats.add_blob(blob_bytes=1000, is_skipped=False)
      stats.add_blob(blob_bytes=2000, is_skipped=True)
      self.assertEqual(stats.has_new_data_since_last_summarize(), True)
      uploaded_summary, skipped_summary = stats.summarize()
      self.assertEqual(
          uploaded_summary,
          "1234 scalars, 40 tensors (200 B), 1 binary objects (1000 B)",
      )
      self.assertEqual(
          skipped_summary,
          "10 tensors (1.8 kB), 1 binary objects (2.0 kB)",
      )
      self.assertEqual(stats.has_new_data_since_last_summarize(), False)
  
imports: import sys
  from unittest import mock
  from tensorboard import test
  from tensorboard.uploader import upload_tracker
label_desc: Use image node_id 7 for calling the UploadStatsTest obj's underlying member method code with example usage: obj.testUploadedSummaryWithTensorsAndBlobs() without return types