code: def _gather_active_forms(self):
          
          for stmt in self.statements:
              if isinstance(stmt, ActiveForm):
                  base_agent = self.agent_set.get_create_base_agent(stmt.agent)
                  # Handle the case where an activity flag is set
                  agent_to_add = stmt.agent
                  if stmt.agent.activity:
                      new_agent = fast_deepcopy(stmt.agent)
                      new_agent.activity = None
                      agent_to_add = new_agent
                  base_agent.add_activity_form(agent_to_add, stmt.is_active)
docs: Collect all the active forms of each Agent in the Statements.