def chgid(name, gid):
    pre_info = info(name)
    if not pre_info:
        raise CommandExecutionError(
            'User \'{0}\' does not exist'.format(name)
        )
    if gid == pre_info['gid']:
        return True
    cmd = ['pw', 'usermod', '-g', gid, '-n', name]
    __salt__['cmd.run'](cmd, python_shell=False)
    return info(name).get('gid') == gid
Verify that op2.MIN does not reduce a minimum value larger than the
dataset/ETHPy150Open saltstack/salt/salt/modules/pw_user.py/chgid--crossover with--dataset/ETHPy150Open OP2/PyOP2/test/unit/test_direct_loop.py/TestDirectLoop.test_global_min_g_is_min