d = OrderedDict([('aaaa', 'a'), ('bbbb', 'b'), ('cccc', 'c'), ('dddd', 'd'),
    ('eeee', 'e'), ('ffff', 'f')])
In Python, How can I get the next and previous key:value of a particular key in a dictionary?