def checkBaseClassesMatch(bases, typename):
    """Recursively check if the name of the types in bases (or parents) are equal to typename
    
    | *Args:*
    |     bases - A tuple of types
    |     typename : str - A name of a type
    
    | *Returns:*
    |     True if any of the names of types in bases or any of their parent bases equals typename,
    |         False otherwise
    """

    for baseClass in bases:
        if (typename == baseClass.__name__):
            return True
        else:
            if checkBaseClassesMatch(baseClass.__bases__, typename):
                return True