code: def _write_event(self, event):
      data = event.SerializeToString()
      # See RecordWriter::WriteRecord from record_writer.cc
      w = self._writer.write
      header = struct.pack("Q", len(data))
      w(header)
      w(struct.pack("I", masked_crc32c(header)))
      w(data)
      w(struct.pack("I", masked_crc32c(data)))
      self._writer.flush()
  
imports: from collections import defaultdict
  import os
  import re
  import socket
  import struct
  import time
  import numpy
  import six
  import scipy.misc
  from .crc32c import crc32c
label_desc: Use image node_id 12 for calling the Logger obj's underlying member method code with example usage: obj._write_event(event) without return types