a method to find meetup groups based upon a number of filters

        :param topics: [optional] list of integer meetup ids for topics
        :param text: [optional] string with words in groups to search
        :param country_code: [optional] string with two character country code
        :param latitude: [optional] float with latitude coordinate at center of geo search
        :param longitude: [optional] float with longitude coordinate at center of geo search
        :param location: [optional] string with meetup location name fields to search
        :param radius: [optional] float with distance from center of geographic search
        :param zip_code: [optional] string with zip code of geographic search
        :param max_results: [optional] integer with number of groups to include
        :param member_groups: [optional] boolean to include groups member belongs to
        :return: dictionary with list of group details inside [json] key

        group_details = self._reconstruct_group(**{})

def list_groups(self, topics=None, categories=None, text='', country_code='', latitude=0.0, longitude=0.0, location='', radius=0.0, zip_code='', max_results=0, member_groups=True):

        ''' a method to find meetup groups based upon a number of filters

        :param topics: [optional] list of integer meetup ids for topics
        :param text: [optional] string with words in groups to search
        :param country_code: [optional] string with two character country code
        :param latitude: [optional] float with latitude coordinate at center of geo search
        :param longitude: [optional] float with longitude coordinate at center of geo search
        :param location: [optional] string with meetup location name fields to search
        :param radius: [optional] float with distance from center of geographic search
        :param zip_code: [optional] string with zip code of geographic search
        :param max_results: [optional] integer with number of groups to include
        :param member_groups: [optional] boolean to include groups member belongs to
        :return: dictionary with list of group details inside [json] key

        group_details = self._reconstruct_group(**{})
        '''

    # https://www.meetup.com/meetup_api/docs/find/groups/

        title = '%s.list_groups' % self.__class__.__name__

    # validate inputs
        input_fields = {
            'categories': categories,
            'topics': topics,
            'text': text,
            'country_code': country_code,
            'latitude': latitude,
            'longitude': longitude,
            'location': location,
            'radius': radius,
            'zip_code': zip_code,
            'max_results': max_results
        }
        for key, value in input_fields.items():
            if value:
                object_title = '%s(%s=%s)' % (title, key, str(value))
                self.fields.validate(value, '.%s' % key, object_title)

    # construct request fields
        url = '%s/find/groups' % self.endpoint
        params = {
            'fields': 'last_event,next_event,join_info',
            'self_groups': 'include'
        }
        if not member_groups:
            params['self_groups'] = 'exclude'
        if max_results:
            params['page'] = str(max_results)
        if categories:
            params['category'] = ','.join(str(item) for item in categories)
        if topics:
            params['topic_id'] = ','.join(str(item) for item in categories)
        if text:
            params['text'] = text
        if country_code:
            params['country'] = country_code.lower()
        if latitude:
            params['lat'] = str(latitude)
        if longitude:
            params['lon'] = str(longitude)
        if location:
            params['location'] = location
        if radius:
            params['radius'] = str(radius)
        if zip_code:
            params['zip'] = zip_code

    # send request
        response_details = self._get_request(url, params=params)

    # construct method output
        meetup_groups = {
            'json': []
        }
        for key, value in response_details.items():
            if key != 'json':
                meetup_groups[key] = value
        for group in response_details['json']:
            meetup_groups['json'].append(self._reconstruct_group(group))

        return meetup_groups