def output(self, response, accepts):
graph = self.get_graph(response)<EOL>if graph is not None:<EOL><INDENT>mimetype, format = self.format_selector.decide(accepts, graph.context_aware)<EOL>if mimetype is None:<EOL><INDENT>return self.make_406_response()<EOL><DEDENT>if '<STR_LIT:text>' in mimetype:<EOL><INDENT>mimetype = mimetype + '<STR_LIT>'<EOL><DEDENT>serialized = graph.serialize(format=format)<EOL>response = self.make_new_response(response, mimetype, serialized)<EOL>return response<EOL><DEDENT>else:<EOL><INDENT>return response<EOL><DEDENT>
Formats a response from a view to handle any RDF graphs
            If a view function returns an RDF graph, serialize it based on Accept header
            If it's not an RDF graph, return it without any special handling