def get_smoothed_sent_dist(address): sent_dist = sent_distributions.find_one({'address': address}) smitty = Smoother(sent_dist['sent_distribution'], 'total') smitty.smooth() smoothed_dist = smitty.to_objects() return smoothed_dist