def transformations(self, relationship="<STR_LIT:all>"):
if relationship not in ["<STR_LIT:all>", "<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format(relationship)<EOL>+ "<STR_LIT>"<EOL>)<EOL><DEDENT>if relationship == "<STR_LIT:all>":<EOL><INDENT>return Transformation.query.filter(<EOL>and_(<EOL>Transformation.failed == false(),<EOL>or_(<EOL>Transformation.info_in == self, Transformation.info_out == self<EOL>),<EOL>)<EOL>).all()<EOL><DEDENT>if relationship == "<STR_LIT>":<EOL><INDENT>return Transformation.query.filter_by(<EOL>info_in_id=self.id, failed=False<EOL>).all()<EOL><DEDENT>if relationship == "<STR_LIT>":<EOL><INDENT>return Transformation.query.filter_by(<EOL>info_out_id=self.id, failed=False<EOL>).all()<EOL><DEDENT>
Get all the transformations of this info.

        Return a list of transformations involving this info. ``relationship``
        can be "parent" (in which case only transformations where the info is
        the ``info_in`` are returned), "child" (in which case only
        transformations where the info is the ``info_out`` are returned) or
        ``all`` (in which case any transformations where the info is the
        ``info_out`` or the ``info_in`` are returned). The default is ``all``