def transformations(self, type=None, failed=False):
if failed not in ["<STR_LIT:all>", False, True]:<EOL><INDENT>raise ValueError("<STR_LIT>".format(failed))<EOL><DEDENT>if type is None:<EOL><INDENT>type = Transformation<EOL><DEDENT>if failed == "<STR_LIT:all>":<EOL><INDENT>return type.query.filter_by(node_id=self.id).all()<EOL><DEDENT>else:<EOL><INDENT>return type.query.filter_by(node_id=self.id, failed=failed).all()<EOL><DEDENT>
Get Transformations done by this Node.

type must be a type of Transformation (defaults to Transformation)
Failed can be True, False or "all"