def METHOD_NAME(t):
    klass, params = t
    if not isinstance(klass, type):
        raise ValueError(f"Expected first element to be a class, got {klass}")
    if not isinstance(params, dict):
        raise ValueError(f"Expected second element to be a dict, got {params}")
    return (klass(**combo) for combo in _expand_param_grid(params))