def traverse_item_heirarchy(root, keys):
    """
    Given a root and a list of keys, follow each key to get the value.

    e.g.
        traverse_item_heirarchy(root, [0, 'a', 'b'])
    is equivalent to
        root[0]['a']['b']
    """
    item = root
    for key in keys:
        item = item[key]
    return item