def get_origin(tp):
    """
    Simplified getting of the unsubscripted version of a type. Should be replaced with typing.get_origin from Python >= 3.8
    """
    if hasattr(tp, '__origin__'):
        return tp.__origin__
    return None