class_docstr: Shipper reads structured logs from logq and ships them to the determined-master.
  
  It will send a message on doneq when it finishes.
docstr: Ship a special message, probably from failing to start the child process.
docstr_tok: ["Ship","a","special","message",",","probably","from","failing","to","start","the","child","process","."]
code: def ship_special(
      self, msg: str, metadata: Dict[str, str], emit_stdout_logs: bool
  ) -> None:
      """
      Ship a special message, probably from failing to start the child process.
      """
      now = datetime.datetime.now(datetime.timezone.utc).isoformat()
      logs = []
      # Build a json log line out of each message line.
      if not msg.endswith("\n"):
          msg += "\n"
      for line in msg.splitlines(keepends=True):
          if emit_stdout_logs:
              print(line, end="", file=sys.stderr)
          logs.append(
              {
                  "timestamp": now,
                  "log": line,
                  "level": "ERROR",
                  "stdtype": "stderr",
                  **metadata,
              }
          )
  
      data = json.dumps({"logs": logs}).encode("utf8")
  
      # Try to ship for about 30 seconds.
      backoffs = [0, 1, 5, 10, 15]
      self.ship(data, backoffs)
  
imports: import datetime
  import io
  import json
  import logging
  import os
  import queue
  import re
  import signal
  import socket
  import ssl
  import subprocess
  import sys
  import threading
  import time
  import traceback
  import urllib.error
  import urllib.request
  from typing import Any, Dict, Iterator, List, NamedTuple, Optional, cast
label_desc: Use image node_id 5 for calling the Shipper obj's underlying member method code with example usage: obj.ship_special(msg, metadata, emit_stdout_logs) without return types