harbor run -t openthoughts/tasktrove-exp-rle-adversarial-5k-adversarial-0547harbor download openthoughts/tasktrove-exp-rle-adversarial-5k-adversarial-0547Task: Implement a fully validated Access Groups V2 service (access_groups_v2) for the Tenable SDK
What to implement
A service class (or module) that exposes the Access Groups V2 operations and internal helpers used by the tests:
Private helpers:
_principal_constructor(principals_input): Accepts a list containing a single principal spec (as in the tests) and returns a canonical list of principal dicts. It must support:
_list_clean(items): Validate input is a list and return a deduplicated version of the list. If input is not a list, raise TypeError. Duplicates should be removed; the tests only require duplicates to be removed (order not important since test sorts the result).
Core operations (wrappers around the underlying API client):
create(name, rules, all_users=False, access_group_type='assets', principals=None)
delete(group_id)
edit(group_id, **kwargs)
details(group_id)
list(...)
Error handling
Data shapes and expectations (for tests to pass)
Integration and usage notes
How this will be validated
Deliverables
Notes
Output only the instruction: