def METHOD_NAME(api, targetgroup):
    """
    test to edit the target groups
    """
    members = targetgroup['members'].split(',')
    members.append('192.168.0.2')
    resp = api.target_groups.edit(targetgroup['id'], members=members, name='targetgroup_name')
    assert isinstance(resp, dict)
    check(resp, 'acls', list)
    for data in resp['acls']:
        check(data, 'display_name', str, allow_none=True)
        check(data, 'id', int, allow_none=True)
        check(data, 'name', str, allow_none=True)
        check(data, 'owner', int, allow_none=True)
        check(data, 'permissions', int)
        check(data, 'type', str)
    check(resp, 'creation_date', int)
    check(resp, 'default_group', int)
    check(resp, 'id', int)
    check(resp, 'last_modification_date', int)
    check(resp, 'members', str)
    check(resp, 'name', str)
    check(resp, 'owner', str)
    check(resp, 'owner_id', int)
    check(resp, 'shared', int)
    check(resp, 'user_permissions', int)
    assert resp['members'] == ', '.join(members)