<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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
        }