Pooling or sampling: Collective dynamics for electrical flow estimation