def MakePmfFromItems(t, label=None):
 return Pmf(dict(t), label=label)

def MakePmfFromItems ( t , label = None ) : return Pmf ( dict ( t ) , label = label )
makes a pmf from a sequence of value-probability pairs args: t: sequence of value-probability pairs label: string label for this pmf returns: pmf object .