def _is_subclass(type_, class_or_tuple):
    """Determine if the type is a subclass of the given class or classes.

    This takes __origin__ classes into consideration and does not raise.

    Args:
        type_: The type that may be a subclass.
        class_or_tuple: A type or a tuple containing multiple types of which
            type_ may be a subclass.

    Returns:
        A boolean indicating whether the given type is a subclass of the
    """
    try:
        return issubclass(type_, class_or_tuple)
    except (TypeError, AttributeError):
        pass
    if hasattr(type_, '__origin__') and type_.__origin__:
        try:
            return issubclass(type_.__origin__, class_or_tuple)
        except (TypeError, AttributeError):
            pass
    return False
