code: def get_collection(collection):
      
      cls = endpoint_class(collection)
  
      resources = retrieve_collection(collection, request.args)
  
      _validate(cls, request.method, resources)
  
      start = stop = None
  
      if request.args and 'page' in request.args:
          page = int(request.args['page'])
          results_per_page = app.config.get('RESULTS_PER_PAGE', 20)
          start, stop = page * results_per_page, (page + 1) * results_per_page
      return collection_response(cls, resources, start, stop)
docs: Return the appropriate *Response* for retrieving a collection of
      resources.
  
      :param string collection: a :class:`sandman.model.Model` endpoint
      :param string key: the primary key for the :class:`sandman.model.Model`
      :rtype: :class:`flask.Response`