@classmethod<EOL><INDENT>def inflate(cls, node):<DEDENT>
<EOL>if isinstance(node, int):<EOL><INDENT>snode = cls()<EOL>snode.id = node<EOL><DEDENT>else:<EOL><INDENT>node_properties = _get_node_properties(node)<EOL>props = {}<EOL>for key, prop in cls.__all_properties__:<EOL><INDENT>db_property = prop.db_property or key<EOL>if db_property in node_properties:<EOL><INDENT>props[key] = prop.inflate(node_properties[db_property], node)<EOL><DEDENT>elif prop.has_default:<EOL><INDENT>props[key] = prop.default_value()<EOL><DEDENT>else:<EOL><INDENT>props[key] = None<EOL><DEDENT><DEDENT>snode = cls(**props)<EOL>snode.id = node.id<EOL><DEDENT>return snode<EOL>
Inflate a raw neo4j_driver node to a neomodel node
:param node:
:return: node object