code: def run(users, hosts, func, **kwargs):
      
      attempts = kwargs.get("attempts", 1)
      if "attempts" in kwargs:
          del kwargs["attempts"]
      queue = Queue(**kwargs)
      queue.add_account(users)
      queue.run(hosts, func, attempts)
      queue.destroy()
docs: Convenience function that creates an Exscript.Queue instance, adds
      the given accounts, and calls Queue.run() with the given
      hosts and function as an argument.
  
      If you also want to pass arguments to the given function, you may use
      util.decorator.bind() like this::
  
        def my_callback(job, host, conn, my_arg, **kwargs):
            print(my_arg, kwargs.get('foo'))
  
        run(account,
            host,
            bind(my_callback, 'hello', foo = 'world'),
            max_threads = 10)
  
      :type  users: Account|list[Account]
      :param users: The account(s) to use for logging in.
      :type  hosts: Host|list[Host]
      :param hosts: A list of Host objects.
      :type  func: function
      :param func: The callback function.
      :type  kwargs: dict
      :param kwargs: Passed to the Exscript.Queue constructor.