def EditLocalGroup(action, recordtype, account, group):
  if action in _EDITGROUPACTIONS:
    operation = _EDITGROUPACTIONS[action]
  else:
    raise DSException('Unsupported dseditgroup action %s' % action)

  cmd = [_DSEDITGROUP, '-o', 'edit', '-n', '.',
         operation, account, '-t', recordtype, group]
  (stdout, stderr, rc) = gmacpyutil.RunProcess(cmd)
  if rc is not 0:
    raise DSException('Error modifying group %s with %s %s -t %s,'
                      'returned %s\n%s' %
                      (group, operation, account, recordtype, stdout, stderr))
Edit a local DirectoryService group.
dataset/ETHPy150Open google/macops/gmacpyutil/gmacpyutil/ds.py/EditLocalGroup