@hooks<EOL><INDENT>def save(self):<DEDENT>
<EOL>if hasattr(self, '<STR_LIT:id>'):<EOL><INDENT>params = self.deflate(self.__properties__, self)<EOL>query = "<STR_LIT>"<EOL>query += "<STR_LIT:\n>".join(["<STR_LIT>".format(key, key) + "<STR_LIT:\n>"<EOL>for key in params.keys()])<EOL>for label in self.inherited_labels():<EOL><INDENT>query += "<STR_LIT>".format(label)<EOL><DEDENT>self.cypher(query, params)<EOL><DEDENT>elif hasattr(self, '<STR_LIT>') and self.deleted:<EOL><INDENT>raise ValueError("<STR_LIT>".format(<EOL>self.__class__.__name__))<EOL><DEDENT>else:  <EOL><INDENT>self.id = self.create(self.__properties__)[<NUM_LIT:0>].id<EOL><DEDENT>return self<EOL>
Save the node to neo4j or raise an exception

:return: the node instance