def __call__(cls, *args, **kwargs):
        """
        Override call to use objects from a pool if identical parameters are used for object creation.

        @param args: Arguments for class instantiation.
        @param kwargs: Keyword arguments for class instantiation.
        @return: A new instance of the class.
        """
        key = FlyweightMeta._serialize(cls, *args, **kwargs)
        pool = getattr(cls, 'pool', {})

        instance = pool.get(key)
        if not instance:
            instance = super(FlyweightMeta, cls).__call__(*args, **kwargs)
            pool[key] = instance

        return instance

        Override call to use objects from a pool if identical parameters are used for object creation.

        @param args: Arguments for class instantiation.
        @param kwargs: Keyword arguments for class instantiation.
        @return: A new instance of the class.
        
pypattyrn/structural/flyweight.py