<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter_host_by_group(group):
 """Filter for host Filter on group :param group: group name to filter :type group: str :return: Filter :rtype: bool """


    def inner_filter(items):
        """Inner filter for host. Accept if group in host.hostgroups"""
        host = items["host"]
        if host is None:
            return False
        return group in [items["hostgroups"][g].hostgroup_name for g in host.hostgroups]

    return inner_filter