Mask Function In Python With Parameters