code: def infer_active_forms(stmts):
          linked_stmts = []
          for act_stmt in _get_statements_by_type(stmts, RegulateActivity):
              if not (act_stmt.subj.activity is not None and
                  act_stmt.subj.activity.activity_type == 'kinase' and
                  act_stmt.subj.activity.is_active):
                  continue
              matching = []
              ev = act_stmt.evidence
              for mod_stmt in _get_statements_by_type(stmts, Modification):
                  if mod_stmt.enz is not None:
                      if mod_stmt.enz.entity_matches(act_stmt.subj) and \
                          mod_stmt.sub.entity_matches(act_stmt.obj):
                          matching.append(mod_stmt)
                          ev.extend(mod_stmt.evidence)
              if not matching:
                  continue
              mods = []
              for mod_stmt in matching:
                  mod_type_name = mod_stmt.__class__.__name__.lower()
                  if isinstance(mod_stmt, AddModification):
                      is_modified = True
                  else:
                      is_modified = False
                      mod_type_name = mod_type_name[2:]
                  mc = ModCondition(mod_type_name, mod_stmt.residue,
                                    mod_stmt.position, is_modified)
                  mods.append(mc)
              source_stmts = [act_stmt] + [m for m in matching]
              st = ActiveForm(Agent(act_stmt.obj.name, mods=mods,
                                    db_refs=act_stmt.obj.db_refs),
                              act_stmt.obj_activity, act_stmt.is_activation,
                              evidence=ev)
              linked_stmts.append(LinkedStatement(source_stmts, st))
              logger.info('inferred: %s' % st)
          return linked_stmts