{{1,2}, {3,4}}
leads to:
TypeError: unhashable type: 'set'
Instead, use frozenset:
frozenset
{frozenset({1, 2}), frozenset({3, 4})}