code: def replace_all(self, old, new):
      for s in self.sets:
          for ex, ctx in s:
              ex.replace(old.variable, new)
              if ctx is not None:
                  ctx.replace(old.variable, new)
  
imports: from nltk.inference.api import BaseProverCommand, Prover
  from nltk.internals import Counter
  from nltk.sem.logic import AbstractVariableExpression, AllExpression, AndExpression, ApplicationExpression, EqualityExpression, ExistsExpression, Expression, FunctionVariableExpression, IffExpression, ImpExpression, LambdaExpression, NegatedExpression, OrExpression, Variable, VariableExpression, unique_variable
label_desc: Use image node_id 8 for calling the Agenda obj's underlying member method code with example usage: obj.replace_all(old, new) without return types