(self, search_dict, key, cap=False)
return None
recursive dictionary lookup
        if cap is true, return key if it's in the 'cap' dictionary,
        else return the actual key value
recursive dictionary lookup
        if cap is true, return key if it's in the 'cap' dictionary,
        else return the actual key value
recursive dictionary lookup if cap is true return key if it s in the cap dictionary else return the actual key value
def recursive_lookup(self, search_dict, key, cap=False):
        '''
        recursive dictionary lookup
        if cap is true, return key if it's in the 'cap' dictionary,
        else return the actual key value
        '''
        for k, v in search_dict.items():
            if cap:
                if k == 'cap':
                    return self.recursive_lookup(v, key, False)
            elif k == key:
                return v 
            elif isinstance(v, dict) and k != 'cap':
                val = self.recursive_lookup(v, key, cap)
                if val is not None:
                    return val
        return None
def recursive_lookup ( self , search_dict , key , cap = False ) : for k , v in search_dict . items ( ) : if cap : if k == 'cap' : return self . recursive_lookup ( v , key , False ) elif k == key : return v elif isinstance ( v , dict ) and k != 'cap' : val = self . recursive_lookup ( v , key , cap ) if val is not None : return val return None