code: def _publish(
      self, record: "pb.Record", local: Optional[bool] = None
  ) -> None:
      if (
          self._process_check
          and self._process
          and not self._process.is_alive()
      ):
          raise Exception("The wandb backend process has shutdown")
      if local:
          record.control.local = local
      if self.record_q:
          tracelog.log_message_queue(record, self.record_q)
          self.record_q.put(record)
  
file_path: wandb/wandb/sdk/interface/interface_queue.py
imports: import logging
  from multiprocessing.process import BaseProcess
  from typing import TYPE_CHECKING, Optional
  from ..lib import tracelog
  from ..lib.mailbox import Mailbox
  from .interface_shared import InterfaceShared
  from .router_queue import MessageQueueRouter
label_desc: Use image node_id 3 for calling the InterfaceQueue obj's underlying member method code with example usage: obj._publish(record, local) without return types