A conductivity-dependent phase transition from closed-loop to open-loop dendritic networks