<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setup_network_agents(self):
 """Initializes agents on nodes of graph and registers them to the SimPy environment"""

        for i in self.env.G.nodes():
            self.env.G.node[i]['agent'] = self.agent_type(environment=self.env, agent_id=i,
                                                          state=deepcopy(self.initial_states[i]))