def get_args(tp):
    """
    Simplified getting of type arguments. Should be replaced with typing.get_args from Python >= 3.8
    """
    if hasattr(tp, '__args__'):
        return tp.__args__
    return ()