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

        type specifies the type of transformation (default = Transformation).
        failed = { False, True, "all" }

        To get transformations from a specific node,
        see Node.transformations().