code: def MakePmfFromDict(d, name=''):
      
      pmf = Pmf(d, name)
      pmf.Normalize()
      return pmf
docs: Makes a PMF from a map from values to probabilities.
  
      Args:
          d: dictionary that maps values to probabilities
          name: string name for this PMF
  
      Returns:
          Pmf object