code: def get_resource_attribute(collection, key, attribute):
      
      resource = retrieve_resource(collection, key)
      _validate(endpoint_class(collection), request.method, resource)
      value = getattr(resource, attribute)
      if isinstance(value, Model):
          return resource_response(value)
      else:
          return attribute_response(resource, attribute, value)
docs: Return the appropriate *Response* for retrieving an attribute of
      a single resource.
  
      :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`