docs: def salt_proxy():
      '''
      Start a proxy minion.
      '''
      import salt.cli.daemons
      import salt.utils.platform
      import multiprocessing
      if '' in sys.path:
          sys.path.remove('')
  
      if salt.utils.platform.is_windows():
          proxyminion = salt.cli.daemons.ProxyMinion()
          proxyminion.start()
          return
  
      if '--disable-keepalive' in sys.argv:
          sys.argv.remove('--disable-keepalive')
          proxyminion = salt.cli.daemons.ProxyMinion()
          proxyminion.start()
          return
  
      # keep one minion subprocess running
      while True:
          try:
              queue = multiprocessing.Queue()
          except Exception:
              # This breaks in containers
              proxyminion = salt.cli.daemons.ProxyMinion()
              proxyminion.start()
              return
          process = multiprocessing.Process(target=proxy_minion_process, args=(queue,))
          process.start()
          try:
              process.join()
              try:
                  restart_delay = queue.get(block=False)
              except Exception:
                  if process.exitcode == 0:
                      # Minion process ended naturally, Ctrl+C or --version
                      break
                  restart_delay = 60
              if restart_delay == 0:
                  # Minion process ended naturally, Ctrl+C, --version, etc.
                  sys.exit(process.exitcode)
              # delay restart to reduce flooding and allow network resources to close
              time.sleep(restart_delay)
          except KeyboardInterrupt:
              break
          # need to reset logging because new minion objects
          # cause extra log handlers to accumulate
          rlogger = logging.getLogger()
          for handler in rlogger.handlers:
              rlogger.removeHandler(handler)
          logging.basicConfig()