search trees listing continued returns the data associated with the target key or none def getdataselftarget )if target =self key return self data elif self key is not none and target =self key return self data else return none chooses the appropriate branch for the given target def getbranchselftarget )if target self key return self left elif self key is none return self middle elif target self key return self middle else return self right the node class contains seven fieldsone for each of the two keys and corresponding data and one for each of the three child links it also defines three accessor methods that compute information related to the given node the isleaf(method determines if the node is leafisfull(determines if the node contains two keyshaskey(determines if the target key is contained in the nodegetdata(returns the data associated with the given key or none if the key is not in the nodeand getbranch(compares target key to the nodes key(sand returns reference to the appropriate branch that must be followed to find the target these methods are included to provide meaningful names for those common operations searching searching - tree is very similar to that of binary search tree we start at the root and follow the appropriate branch based on the value of the target key the only difference is that we have to compare the target against both keys if the node contains two keysand we have to choose from among possibly three branches as in binary search treea successful search will lead to key in one of the nodes while an unsuccessful search will lead to null link that null link will always be in leaf node the reason for this is that if an interior node contains one keyit always contains two child linksone for the keys less than its key and one for the keys greater than its key in similar fashionif the node contains two keysit will always contain three child links that direct us to one of the value ranges( keys less than the node' first key( keys greater than the node' first key but less than its second keyand ( keys greater than the node' second key thusthere is never an opportunity to take null link from an interior node as there was in binary