<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def children_of_group(self, group: Union[str, Group]) -> Set[Host]: """ Returns set of hosts that belongs to a group including those that belong indirectly via inheritance """

        hosts: List[Host] = set()
        for host in self.hosts.values():
            if host.has_parent_group(group):
                hosts.add(host)
        return hosts