def METHOD_NAME(self, tree, attrList):
    """ determines the required attributes to satisfy policy tree and returns a list of BinNode
    objects."""
    if tree == None: return 0
    Left = tree.getLeft()
    Right = tree.getRight()
    if Left: resultLeft, leftAttr = self.METHOD_NAME(Left, attrList)
    if Right: resultRight, rightAttr = self.METHOD_NAME(Right, attrList)
    if(tree.getNodeType() == OpType.OR):
        # never return both attributes, basically the first one that matches from left to right
        if resultLeft: sendThis = leftAttr
        elif resultRight: sendThis = rightAttr
        else: sendThis = None
        result = (resultLeft or resultRight)
        if result == False: return (False, sendThis)            
        return (True, sendThis)
    if(tree.getNodeType() == OpType.AND):
        if resultLeft and resultRight: sendThis = leftAttr + rightAttr
        elif resultLeft: sendThis = leftAttr
        elif resultRight: sendThis = rightAttr
        else: sendThis = None
        result = (resultLeft and resultRight)
        if result == False: return (False, sendThis)
        return (True, sendThis)
    elif(tree.getNodeType() == OpType.ATTR):
        if(tree.getAttribute() in attrList):
            return (True, [tree])
        else:
            return (False, None)
    return