code: def get(self, user_id=None):
          
          if user_id is None:
              res = self._get(
                  'groups/get',
                  result_processor=lambda x: x['groups']
              )
          else:
              res = self._post(
                  'groups/getid',
                  data={'openid': user_id},
                  result_processor=lambda x: x['groupid']
              )
          return res
docs: 查询所有分组或查询用户所在分组 ID
  
          详情请参考
          http://mp.weixin.qq.com/wiki/0/56d992c605a97245eb7e617854b169fc.html
  
          :param user_id: 用户 ID，提供时查询该用户所在分组，否则查询所有分组
          :return: 所有分组列表或用户所在分组 ID
  
          使用示例::
  
              from wechatpy import WeChatClient
  
              client = WeChatClient('appid', 'secret')
              group = client.group.get('openid')