code: def fire_event(key, msg, tag, sock_dir, args=None, transport='zeromq'):
      '''
      Fire deploy action
      '''
      event = salt.utils.event.get_event(
          'master',
          sock_dir,
          transport,
          listen=False)
  
      try:
          event.fire_event(msg, tag)
      except ValueError:
          # We're using at least a 0.17.x version of salt
          if isinstance(args, dict):
              args[key] = msg
          else:
              args = {key: msg}
          event.fire_event(args, tag)
  
      # https://github.com/zeromq/pyzmq/issues/173#issuecomment-4037083
      # Assertion failed: get_load () == 0 (poller_base.cpp:32)
      time.sleep(0.025f fire_event(key, msg, tag, sock_dir, args=None, transport='zeromq'):
      '''
      Fire deploy action
      '''
      event = salt.utils.event.get_event(
          'master',
          sock_dir,
          transport,
          listen=False)
  
      try:
          event.fire_event(msg, tag)
      except ValueError:
          # We're using at least a 0.17.x version of salt
          if isinstance(args, dict):
              args[key] = msg
          else:
              args = {key: msg}
          event.fire_event(args, tag)
  
      # https://github.com/zeromq/pyzmq/issues/173#issuecomment-4037083
      # Assertion failed: get_load () == 0 (poller_base.cpp:32)
      time.sleep(0.025)
docs: Fire deploy action