def isSubtree(self, supertree):
        
        rootId = self.getRootId()
        vertexStack = [rootId]
        
        while len(vertexStack) != 0: 
            vertexId = vertexStack.pop()
            
            if not supertree.vertexExists(vertexId): 
                return False 
                
            children = self.neighbours(vertexId)
            for childId in children:
                if not self.edgeExists(vertexId, childId): 
                    return False 
                    
            vertexStack.extend(children)
        
        return True
Test if this tree is a subtree of the input tree supertree. This is based 
dataset/ETHPy150Open charanpald/APGL/apgl/graph/DictTree.py/DictTree.isSubtree