def _find_value(ret_dict, key, path=None):
 if (path is None):
  path = key
 else:
  path = '{0}:{1}'.format(path, key)
 ret = []
 for (ikey, val) in six.iteritems(ret_dict):
  if (ikey == key):
   ret.append({path: val})
  if isinstance(val, list):
   for item in val:
    if isinstance(item, dict):
     ret = (ret + _find_value(item, key, path))
  if isinstance(val, dict):
   ret = (ret + _find_value(val, key, path))
 return ret

def _find_value ( ret_dict , key , path = None ) : if ( path is None ) : path = key else : path = '{0}:{1}' . format ( path , key ) ret = [ ] for ( ikey , val ) in six . iteritems ( ret_dict ) : if ( ikey == key ) : ret . append ( { path : val } ) if isinstance ( val , list ) : for item in val : if isinstance ( item , dict ) : ret = ( ret + _find_value ( item , key , path ) ) if isinstance ( val , dict ) : ret = ( ret + _find_value ( val , key , path ) ) return ret
private method traverses a dictionary of dictionaries/lists to find key and return the value stored .