Seperate closed subnetwork contraction from trace_out_double_indices
The functionality to contract subnetworks without connection to external indices is also needed in other function (e.g. operator[]) so it should become an independent function.
The functionality to contract subnetworks without connection to external indices is also needed in other function (e.g. operator[]) so it should become an independent function.