Approximate Contraction of Arbitrary Tensor Networks with a Flexible and Efficient Density Matrix Algorithm | Synapse