def buy_postage(shipment, speed="normal"):
    """
    Can choose from several different shipping rates:
    - normal (Media Mail for US, first for International)
    - premium (Priority for US, not offered for International)
    - urgent (Overnight for US, not offered for International)
    """

    if speed == "premium":
        shipment.buy(rate=shipment.lowest_rate(carriers=['USPS'], services=['Priority']))
    elif speed == "urgent":
        shipment.buy(rate=shipment.lowest_rate(carriers=['USPS'], services=['Express']))
    else:
        shipment.buy(rate=shipment.lowest_rate(carriers=['USPS'],))

    #print "Speed: %s" % shipment.rate
    return shipment