code: def infer_modifications(stmts):
          linked_stmts = []
          for act_stmt in _get_statements_by_type(stmts, RegulateActivity):
              for af_stmt in _get_statements_by_type(stmts, ActiveForm):
                  if not af_stmt.agent.entity_matches(act_stmt.obj):
                      continue
                  mods = af_stmt.agent.mods
                  if af_stmt.agent.mutations or \
                      af_stmt.agent.bound_conditions or \
                      af_stmt.agent.location:
                      continue
                  if not af_stmt.agent.mods:
                      continue
                  for mod in af_stmt.agent.mods:
                      evs = act_stmt.evidence + af_stmt.evidence
                      for ev in evs:
                          ev.epistemics['direct'] = False
                      if mod.is_modified:
                          mod_type_name = mod.mod_type
                      else:
                          mod_type_name = modtype_to_inverse[mod.mod_type]
                      mod_class = modtype_to_modclass[mod_type_name]
                      if not mod_class:
                          continue
                      st = mod_class(act_stmt.subj,
                                     act_stmt.obj,
                                     mod.residue, mod.position,
                                     evidence=evs)
                      ls = LinkedStatement([act_stmt, af_stmt], st)
                      linked_stmts.append(ls)
                      logger.info('inferred: %s' % st)
          return linked_stmts