def usergroup_get(name=None, usrgrpids=None, userids=None, **connection_args):
 conn_args = _login(**connection_args)
 try:
  if conn_args:
   method = 'usergroup.get'
   params = {'output': 'extend', 'filter': {}}
   if ((not name) and (not usrgrpids) and (not userids)):
    return False
   if name:
    params['filter'].setdefault('name', name)
   if usrgrpids:
    params.setdefault('usrgrpids', usrgrpids)
   if userids:
    params.setdefault('userids', userids)
   params = _params_extend(params, **connection_args)
   ret = _query(method, params, conn_args['url'], conn_args['auth'])
   return (False if (len(ret['result']) < 1) else ret['result'])
  else:
   raise KeyError
 except KeyError:
  return False

def usergroup_get ( name = None , usrgrpids = None , userids = None , ** connection_args ) : conn_args = _login ( ** connection_args ) try : if conn_args : method = 'usergroup.get' params = { 'output' : 'extend' , 'filter' : { } } if ( ( not name ) and ( not usrgrpids ) and ( not userids ) ) : return False if name : params [ 'filter' ] . setdefault ( 'name' , name ) if usrgrpids : params . setdefault ( 'usrgrpids' , usrgrpids ) if userids : params . setdefault ( 'userids' , userids ) params = _params_extend ( params , ** connection_args ) ret = _query ( method , params , conn_args [ 'url' ] , conn_args [ 'auth' ] ) return ( False if ( len ( ret [ 'result' ] ) < 1 ) else ret [ 'result' ] ) else : raise KeyError except KeyError : return False
retrieve user groups according to the given parameters .