code: def testFinishesLoadingFileWhenSwitchingToNewFile(self):
      self._WriteToFile("a", "a")
      # Empty the iterator.
      self.assertEqual(["a"], list(self._watcher.Load()))
      self._WriteToFile("a", "b")
      self._WriteToFile("b", "c")
      # The watcher should finish its current file before starting a new one.
      self.assertWatcherYields(["b", "c"])
      self.assertFalse(self._watcher.OutOfOrderWritesDetected())
  
imports: import os
  import shutil
  import tensorflow
  from tensorboard.backend.event_processing import directory_watcher
  from tensorboard.backend.event_processing import io_wrapper
label_desc: Use image node_id 12 for calling the DirectoryWatcherTest obj's underlying member method code with example usage: obj.testFinishesLoadingFileWhenSwitchingToNewFile() without return types