def __new__(mcs, name, bases, attrs):
        """
        Override class construction to add 'pool' attribute to classes dict.

        @param name: The name of the class.
        @param bases: Base classes of the class.
        @param attrs: Attributes of the class.
        @return: A new Class.
        """
        attrs['pool'] = dict()
        return super(FlyweightMeta, mcs).__new__(mcs, name, bases, attrs)

        Override class construction to add 'pool' attribute to classes dict.

        @param name: The name of the class.
        @param bases: Base classes of the class.
        @param attrs: Attributes of the class.
        @return: A new Class.
        
pypattyrn/structural/flyweight.py