def METHOD_NAME(tree):
    '''Helper function for pretty-printing json'''
    children = []
    if tree is None:
        children.append(
            qtg.QTreeWidgetItem(["N/A"])
        )
    elif isinstance(tree, (str, int, float, unicode)):
        children.append(
            qtg.QTreeWidgetItem([str(tree)])
        )
    elif isinstance(tree, list):
        for item in tree:
            children.append(
                qtg.QTreeWidgetItem([str(item)])
            )
    elif isinstance(tree, dict):
        for name, item in tree.items():
            new_item = qtg.QTreeWidgetItem([name])
            items_children = METHOD_NAME(item)
            add_all_children(new_item, items_children)
            children.append(new_item)
    else:
        print "Encountered unparseable json entity of type {}".format(type(tree))
    return children