code: def test_expect_bytes_written_bytes_IO(self):
      byte_len = 64
      Bytes_io = io.BytesIO()
      w = RecordWriter(Bytes_io)
      bytes_to_write = b"x" * byte_len
      w.write(bytes_to_write)
      self.assertEqual(len(Bytes_io.getvalue()), (8 + 4 + byte_len + 4))
  
file_path: tensorboard/tensorboard/summary/writer/record_writer_test.py
imports: import io
  import os
  from tensorboard.summary.writer.record_writer import RecordWriter
  from tensorboard.compat.tensorflow_stub import errors
  from tensorboard.compat.tensorflow_stub.pywrap_tensorflow import PyRecordReader_New
  from tensorboard import test
label_desc: Use image node_id 5 for calling the RecordWriterTest obj's underlying member method code with example usage: obj.test_expect_bytes_written_bytes_IO() without return types