<prompt> Kujenga uwakilishi data ya mti.  <response>: There are multiple ways to represent a tree data structure in code, with one being the use of a simple class-based representation, shown below:pythonclass TreeNode: def __init__self, data: self.data data self.children def add_childself, child_node: self.children.appendchild_node Initializing tree and adding nodesroot TreeNoderootchild1 TreeNodechild1child2 TreeNodechild2root.add_childchild1root.add_childchild2grandchild1 TreeNodegrandchild1grandchild2 TreeNodegrandchild2child1.add_childgrandchild1child1.add_childgrandchild2In this representation, each node in the tree is an instance of the class TreeNode. The class has three properties; the data the node holds, and a list of children nodes. We can add child nodes to any node with the add_child method.The resulting tree structure has the following hierarchy: root child1 child2 grandchild1 grandchild2 