'Apply stats provided as a dict or a json encoded string.'

def digest_stats(self, stats):

    if (stats is None):
        return
    if isinstance(stats, dict):
        self.update(stats)
        return
    raise ValueError(_('Unexpected    type    adding    stats'))
