docstr: Write a protocol buffer.
  
  Arguments:
      obj: Protocol buffer to write.
  
  Returns:
      (start_offset, end_offset, flush_offset) if successful,
      None otherwise
docstr_tok: ["Write","a","protocol","buffer",".","Arguments",":","obj",":","Protocol","buffer","to","write",".","Returns",":","(","start_offset",",","end_offset",",","flush_offset",")","if","successful",",","None","otherwise"]
code: def write(self, obj: "Record") -> Tuple[int, int, int]:
      """Write a protocol buffer.
  
      Arguments:
          obj: Protocol buffer to write.
  
      Returns:
          (start_offset, end_offset, flush_offset) if successful,
          None otherwise
  
      """
      raw_size = obj.ByteSize()
      s = obj.SerializeToString()
      assert len(s) == raw_size, "invalid serialization"
      ret = self._write_data(s)
      return ret
  
imports: import logging
  import os
  import struct
  import zlib
  from typing import TYPE_CHECKING, Optional, Tuple
  import wandb
label_desc: Use image node_id 15 for calling the DataStore obj's underlying member method code with example usage: obj.write(obj) and returns: ret