Python Nested Function Set In Python Intersection Of Sets