Stable Diffusion Set Python Intersection Function In Java