code: def _query(cls, **kwargs):
          
          from sevenbridges.models.link import Link
          from sevenbridges.meta.collection import Collection
  
          api = kwargs.pop('api', cls._API)
          url = kwargs.pop('url')
          extra = {'resource': cls.__name__, 'query': kwargs}
          logger.info('Querying {} resource'.format(cls), extra=extra)
          response = api.get(url=url, params=kwargs)
          data = response.json()
          total = response.headers['x-total-matching-query']
  
          items = [cls(api=api, **item) for item in data['items']]
          links = [Link(**link) for link in data['links']]
          href = data['href']
          return Collection(
              resource=cls, href=href, total=total, items=items,
              links=links, api=api
          )
docs: Generic query implementation that is used
          by the resources.