code: def _WriteToFile(self, filename, data, timestamps=None):
      if timestamps is None:
          timestamps = range(len(data))
      self.assertEqual(len(data), len(timestamps))
      path = os.path.join(self._directory, filename)
      with open(path, "a") as f:
          for byte, timestamp in zip(data, timestamps):
              f.write("%f:%s\n" % (timestamp, byte))
  
imports: import functools
  import glob
  import os
  import shutil
  from unittest import mock
  import tensorflow
  from tensorboard.backend.event_processing import directory_loader
  from tensorboard.backend.event_processing import directory_watcher
  from tensorboard.backend.event_processing import event_file_loader
  from tensorboard.backend.event_processing import io_wrapper
  from tensorboard.util import test_util
label_desc: Use image node_id 2 for calling the DirectoryLoaderTest obj's underlying member method code with example usage: obj._WriteToFile(filename, data, timestamps) without return types