'Add or remove SELF.NAME to or from GROUP depending on ACTION.
ACTION can be \'add\' or \'remove\' otherwise \'remove\' is assumed.'

def __modify_group(self, group, action):

    if (action == 'add'):
        option = '-a'
    else:
        option = '-d'
    cmd = ['dseditgroup', '-o', 'edit', option, self.name, '-t', 'user', group]
    (rc, out, err) = self.execute_command(cmd)
    if (rc != 0):
        self.module.fail_json(msg=('Cannot    %s    user    "%s"    to    group    "%s".' % (action, self.name, group)), err=err, out=out, rc=rc)
    return (rc, out, err)
