code: def AreHostsReachable(hostnames, ssh_key):
    
    # validate input
    for hostname in hostnames:
      assert(len(hostname))
    ssh_ok = [exit_code == 0 for (exit_code, _) in
              RunCommandOnHosts('echo test > /dev/null', hostnames, ssh_key)]
    return ssh_ok
docs: Returns list of bools indicating if host reachable via ssh.