code: def substitute(self, var_map, cont=False, tag=None):
          
          return self.apply(substitute, var_map=var_map, cont=cont, tag=tag)
docs: Substitute sub-expressions both on the lhs and rhs
  
          Args:
              var_map (dict): Dictionary with entries of the form
                  ``{expr: substitution}``