Extract a statistical summary of edge weights present in
        the graph.

        :return: A dict with an 'all_weights' list, 'minimum',
        'maximum', 'median', 'mean', 'std_dev'

def weight_statistics(self):
        """
        Extract a statistical summary of edge weights present in
        the graph.

        :return: A dict with an 'all_weights' list, 'minimum',
        'maximum', 'median', 'mean', 'std_dev'
        """

        all_weights = [d.get('weight', None) for u, v, d
                       in self.graph.edges(data=True)]
        stats = describe(all_weights, nan_policy='omit')

        return {
            'all_weights': all_weights,
            'min': stats.minmax[0],
            'max': stats.minmax[1],
            'mean': stats.mean,
            'variance': stats.variance
        }