'Returns top level item from an item'

@staticmethod
def get_root(item):

    parents = [item]
    parent = item.parent()
    while (parent is not None):
        parents.append(parent)
        parent = parent.parent()
    return parents[(len(parents) - 1)]
