code: def GetGroups(r, bulk=False):
      
  
      if bulk:
          return r.request("get", "/2/groups", query={"bulk": 1})
      else:
          groups = r.request("get", "/2/groups")
          return r.applier(itemgetters("name"), groups)
docs: Gets all node groups in the cluster.
  
      @type bulk: bool
      @param bulk: whether to return all information about the groups
  
      @rtype: list of dict or str
      @return: if bulk is true, a list of dictionaries with info about all node
              groups in the cluster, else a list of names of those node groups