code: def _cum_net_resp(node_lis, instance=0):
      
      cum_net_resp = np.load('tmp' + str(instance) +
                             '/node_' + str(node_lis[0]) + '.npy')[0]
      os.remove('tmp' + str(instance) + '/node_' + str(node_lis[0]) + '.npy')
      indices = np.ones(len(cum_net_resp)) * node_lis[0]
      for i in node_lis[1:]:
          node_energy = np.load('tmp' + str(instance) + '/node_' +
                                str(i) + '.npy')[0]
          updated_indices = np.argmax([cum_net_resp, node_energy], axis=0)
          temp = np.array([cum_net_resp, node_energy])
          cum_net_resp = np.array([temp[updated_indices[j]][j]
                                   for j in range(len(updated_indices))])
          del temp, node_energy
          updated_indices[updated_indices == 1] = i
          indices = updated_indices
          os.remove('tmp' + str(instance) + '/node_' + str(i) + '.npy')
      return cum_net_resp, indices
docs: 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