code: def MakeMixture(metapmf, name='mix'):
      
      mix = Pmf(name=name)
      for pmf, p1 in metapmf.Items():
          for x, p2 in pmf.Items():
              mix.Incr(x, p1 * p2)
      return mix
docs: Make a mixture distribution.
  
      Args:
        metapmf: Pmf that maps from Pmfs to probs.
        name: string name for the new Pmf.
  
      Returns: Pmf object.