def add_child(self, child):
    self.children.append(child)

def tree_builder(obj, level=0):
    node = Node(component=obj['component'], status=obj['status'], level=level)
for child in obj.get('children', []):
    node.add_child(tree_builder(child, level=level + 1))
return node

def load_json(filename):
    with open(filename) as f:
        return json.load(f)
obj = load_json('test.json')
tree = tree_builder(obj)
print(tree)
Создайте дерево в python с помощью рекурсии, взяв объект json