def _cum_net_resp(node_lis, instance=<NUM_LIT:0>):
cum_net_resp = np.load('<STR_LIT>' + str(instance) +<EOL>'<STR_LIT>' + str(node_lis[<NUM_LIT:0>]) + '<STR_LIT>')[<NUM_LIT:0>]<EOL>os.remove('<STR_LIT>' + str(instance) + '<STR_LIT>' + str(node_lis[<NUM_LIT:0>]) + '<STR_LIT>')<EOL>indices = np.ones(len(cum_net_resp)) * node_lis[<NUM_LIT:0>]<EOL>for i in node_lis[<NUM_LIT:1>:]:<EOL><INDENT>node_energy = np.load('<STR_LIT>' + str(instance) + '<STR_LIT>' +<EOL>str(i) + '<STR_LIT>')[<NUM_LIT:0>]<EOL>updated_indices = np.argmax([cum_net_resp, node_energy], axis=<NUM_LIT:0>)<EOL>temp = np.array([cum_net_resp, node_energy])<EOL>cum_net_resp = np.array([temp[updated_indices[j]][j]<EOL>for j in range(len(updated_indices))])<EOL>del temp, node_energy<EOL>updated_indices[updated_indices == <NUM_LIT:1>] = i<EOL>indices = updated_indices<EOL>os.remove('<STR_LIT>' + str(instance) + '<STR_LIT>' + str(i) + '<STR_LIT>')<EOL><DEDENT>return cum_net_resp, indices<EOL>
Compute the cumulative network response by reading saved energy .npy files.

:type node_lis: numpy.ndarray
:param node_lis: List of nodes (ints) to read from
:type instance: int
:param instance: Instance flag for parallel workflows, defaults to 0.

:returns: cumulative network response
:rtype: numpy.ndarray
:returns: node indices for each sample of the cumulative network response.
:rtype: list