def contains(self, a):
        """ Check if node contains a given value """
        if self.valcnt is not 0:
            if (self.values[0] > a or self.values[self.valcnt - 1] < a) or a not in self.values:
                return None            
            return self.values[self.values.index(a)]
 Check if node contains a given value 
recipes/Python/577898_23_Tree/recipe-577898.py