ref #9771 allow lists and sets as term graph imput