def METHOD_NAME(agent_id, group_to_check, hosts_list, host_manager):
    # Check the expected group is in the group data for the agent
    for host in hosts_list:
        group_data = host_manager.run_command(host, f'{WAZUH_PATH}/bin/agent_groups -s -i {agent_id}')
        assert group_to_check in group_data, f"Did not recieve expected agent group: {group_to_check} in data \
                                               {str(group_data)} in host {host}"