def list_groups(name):
    groups = [group for group in salt.utils.get_group_list(name)]
    return groups
Return a list of groups the named user belongs to.
dataset/ETHPy150Open saltstack/salt/salt/modules/mac_user.py/list_groups