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: Before we start actually shipping logs, try to confirm that we can reach the master at all.
  
  If we can't, log an overly-detailed explanation to help sysadmins debug their cluster.
  
  Unfortunately, if we can't reach the master, they'll have to use the /ship_logs escape hatch
  to see this message, or be on slurm where we pull slurm's stderr into task logs
  automatically.
docstr_tok: ["Before","we","start","actually","shipping","logs",",","try","to","confirm","that","we","can","reach","the","master","at","all",".","If","we","ca","n't",",","log","an","overly-detailed","explanation","to","help","sysadmins","debug","their","cluster",".","Unfortunately",",","if","we","ca","n't","reach","the","master",",","they","'ll","have","to","use","the","\/ship_logs","escape","hatch","to","see","this","message",",","or","be","on","slurm","where","we","pull","slurm","'s","stderr","into","task","logs","automatically","."]
code: def assert_master_is_reachable(self):
      """
      Before we start actually shipping logs, try to confirm that we can reach the master at all.
  
      If we can't, log an overly-detailed explanation to help sysadmins debug their cluster.
  
      Unfortunately, if we can't reach the master, they'll have to use the /ship_logs escape hatch
      to see this message, or be on slurm where we pull slurm's stderr into task logs
      automatically.
      """
      backoffs = [0, 1, 5, 10, 15]
      for delay in backoffs:
          time.sleep(delay)
          if self.try_reaching_master():
              return
      raise RuntimeError("failed to ever reach master")
  
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 6 for calling the Shipper obj's underlying member method code with example usage: obj.assert_master_is_reachable() without return types