docs: def rsync(hosts, source, destination, logger=None, sudo=False):
      """
      Grabs the hosts (or single host), creates the connection object for each
      and set the rsync execnet engine to push the files.
  
      It assumes that all of the destinations for the different hosts is the
      same. This deviates from what execnet does because it has the flexibility
      to push to different locations.
      """
      logger = logger or basic_remote_logger()
      sync = _RSync(source, logger=logger)
  
      # setup_targets
      if not isinstance(hosts, list):
          hosts = [hosts]
  
      for host in hosts:
          conn = Connection(
              host,
              logger,
              sudo,
          )
          sync.add_target(conn.gateway, destination)
  
      return sync.send()