Metric graph reconstruction from noisy data