from typing import List
from typing import Dict
from typing import Set


def get_hosts_from_trees(tree_list: List[Dict]) -> Set:
    """Retrieve the unique set of hosts from attack trees
    Arguments:
        tree_list(list): attack trees
    Returns:
        set: unique host names
    """
    hosts = {
        hop['node']
        for attack_tree in tree_list
        for hop in attack_tree.get('hops', [])
    }
    return hosts