def filter_hosts_by_initiators(hosts, initiators):
    """Filter hosts by given list of initiators.

    :param hosts: list of PowerStore host objects
    :param initiators: list of initiators
    :return: PowerStore hosts list
    """

    hosts_names_found = set()
    for host in hosts:
        for initiator in host["host_initiators"]:
            if initiator["port_name"] in initiators:
                hosts_names_found.add(host["name"])
    return list(filter(lambda host: host["name"] in hosts_names_found, hosts))