def translated_compounds(self, translate):
compounds = ((compound.translate(translate), value)<EOL>for compound, value in self.compounds)<EOL>return Reaction(self._direction, compounds)<EOL>
Return reaction where compound names have been translated.

        For each compound the translate function is called with the compound
        name and the returned value is used as the new compound name. A new
        reaction is returned with the substituted compound names.