def getFunctions(self, expression):
    list = {}
    if (type(expression).__name__ == 'Function'):
        list[expression.name] = {'isChild': expression.isChild}
    if hasattr(expression, 'operands'):
        for p in expression.operands:
            if (type(p).__name__ == 'Function'):
                list[p.name] = {'isChild': p.isChild}
            elif hasattr(p, 'operands'):
                subList = self.getFunctions(p)
                list = {**list, **subList}
    return list
def getFunctions(self, expression):
    list = {}
    if (type(expression).__name__ == 'Function'):
        list[expression.name] = {'isChild': expression.isChild}
    if hasattr(expression, 'operands'):
        for p in expression.operands:
            if (type(p).__name__ == 'Function'):
                list[p.name] = {'isChild': p.isChild}
            elif hasattr(p, 'operands'):
                subList = self.getFunctions(p)
                list = {**list, **subList}
    return list