code: def update(self, dist):
          
          assert isinstance(dist, DDist)
          for k, c in iteritems(dist.counts):
              self.counts[k] += c
          self.total += dist.total
docs: Adds the given distribution's counts to the current distribution.