Generates a flag value based on the given set of values.

        :param values: <set>

        :return: <int>

def toSet(self, flags):
        """
        Generates a flag value based on the given set of values.

        :param values: <set>

        :return: <int>
        """
        return {key for key, value in self.items() if value & flags}