code: def _write_record(self, record: "pb.Record") -> int:
      assert self._ds
  
      self._record_num += 1
      proto_util._assign_record_num(record, self._record_num)
      ret = self._ds.write(record)
      assert ret is not None
  
      _start_offset, end_offset, _flush_offset = ret
      proto_util._assign_end_offset(record, end_offset)
      return end_offset
  
imports: import logging
  from typing import TYPE_CHECKING, Callable, Optional
  from wandb.proto import wandb_internal_pb2
  from wandb.proto import wandb_telemetry_pb2
  from ..interface.interface_queue import InterfaceQueue
  from ..lib import proto_util, telemetry, tracelog
  from .None import context, datastore, flow_control
  from .settings_static import SettingsStatic
label_desc: Use image node_id 7 for calling the WriteManager obj's underlying member method code with example usage: obj._write_record(record) and returns: end_offset