import inspect


def is_subclass_by_name(child, parent_name):
    """
    return True if child has a parent whose name is "parent_name"

    issubclass does not work if the parent is loaded via import module
    """
    if inspect.isclass(child):
        if parent_name in [ancestor.__name__ for ancestor in inspect.getmro(child)[1:]]:
            return True
    return False