code: def jsonify(resource):
      
  
      response = flask.jsonify(resource.to_dict())
      response = add_link_headers(response, resource.links())
      return response
docs: Return a Flask ``Response`` object containing a
      JSON representation of *resource*.
  
      :param resource: The resource to act as the basis of the response