@classmethod<EOL><INDENT>def replace_graph(cls, response, serialized):<DEDENT>
if cls.is_graph(response): <EOL><INDENT>return serialized<EOL><DEDENT>if hasattr(response, '<STR_LIT>'): <EOL><INDENT>if len(response) > <NUM_LIT:0> andcls.is_graph(response[<NUM_LIT:0>]): <EOL><INDENT>return (serialized,) + response[<NUM_LIT:1>:]<EOL><DEDENT><DEDENT>return response<EOL>
Replace the rdflib Graph in a Flask response