def __contains__(self, flag):
        """
        @param flag: The flag to test for membership in this instance
            set.

        @return: C{True} if C{flag} is in this instance set, else
            C{False}.
        """
        # Optimization for testing membership without iteration.
        return bool(flag & self)

        @param flag: The flag to test for membership in this instance
            set.

        @return: C{True} if C{flag} is in this instance set, else
            C{False}.
        
stackoverflow/venv/lib/python3.6/site-packages/constantly/_constants.py