class_docstr: Test for the UploadTracker class.
class_docstr_tok: ["Test","for","the","UploadTracker","class","."]
code: def testScalarsTracker(self):
      tracker = upload_tracker.UploadTracker(verbosity=1)
      with tracker.scalars_tracker(123):
          self.assertEqual(self.mock_write.call_count, 1)
          self.assertEqual(self.mock_flush.call_count, 1)
          self.assertIn(
              "Uploading 123 scalars...",
              self.mock_write.call_args[0][0],
          )
      self.assertEqual(self.mock_write.call_count, 1)
      self.assertEqual(self.mock_flush.call_count, 1)
      self.assertEqual(tracker.has_data(), True)
  
imports: import sys
  from unittest import mock
  from tensorboard import test
  from tensorboard.uploader import upload_tracker
label_desc: Use image node_id 5 for calling the UploadTrackerTest obj's underlying member method code with example usage: obj.testScalarsTracker() without return types