1"""
2Gather groups for a parser or subparser
3"""
4from typing import Any
5from typing import Dict
6
7
8def get(hub, raw_cli: Dict[str, Any], arg: str) -> Dict[str, Any]:
9    comps = raw_cli[arg]
10
11    if "group" not in comps:
12        return {}
13
14    group = comps["group"]
15
16    return {"groups": [group]}
17