code: def endpoint_class(collection):
      
      with app.app_context():
          try:
              cls = current_app.class_references[collection]
          except KeyError:
              raise InvalidAPIUsage(404)
          return cls
docs: Return the :class:`sandman.model.Model` associated with the endpoint
      *collection*.
  
      :param string collection: a :class:`sandman.model.Model` endpoint
      :rtype: :class:`sandman.model.Model`