def _check_node(self, obj):
if not issubclass(type(obj), self.definition['<STR_LIT>']):<EOL><INDENT>raise ValueError("<STR_LIT>" + self.definition['<STR_LIT>'].__name__)<EOL><DEDENT>if not hasattr(obj, '<STR_LIT:id>'):<EOL><INDENT>raise ValueError("<STR_LIT>" + repr(obj))<EOL><DEDENT>
check for valid node i.e correct class and is saved