code: def add_reverse_effects(self):
          pos_mod_sites = {}
          neg_mod_sites = {}
          syntheses = []
          degradations = []
          for stmt in self.statements:
              if isinstance(stmt, Phosphorylation):
                  agent = stmt.sub.name
                  try:
                      pos_mod_sites[agent].append((stmt.residue, stmt.position))
                  except KeyError:
                      pos_mod_sites[agent] = [(stmt.residue, stmt.position)]
              elif isinstance(stmt, Dephosphorylation):
                  agent = stmt.sub.name
                  try:
                      neg_mod_sites[agent].append((stmt.residue, stmt.position))
                  except KeyError:
                      neg_mod_sites[agent] = [(stmt.residue, stmt.position)]
              elif isinstance(stmt, Influence):
                  if stmt.overall_polarity() == 1:
                      syntheses.append(stmt.obj.name)
                  elif stmt.overall_polarity() == -1:
                      degradations.append(stmt.obj.name)
              elif isinstance(stmt, IncreaseAmount):
                  syntheses.append(stmt.obj.name)
              elif isinstance(stmt, DecreaseAmount):
                  degradations.append(stmt.obj.name)
          new_stmts = []
          for agent_name, pos_sites in pos_mod_sites.items():
              neg_sites = neg_mod_sites.get(agent_name, [])
              no_neg_site = set(pos_sites).difference(set(neg_sites))
              for residue, position in no_neg_site:
                  st = Dephosphorylation(Agent('phosphatase'),
                                             Agent(agent_name),
                                             residue, position)
                  new_stmts.append(st)
          for agent_name in syntheses:
              if agent_name not in degradations:
                  st = DecreaseAmount(None, Agent(agent_name))
                  new_stmts.append(st)
          self.statements += new_stmts