singleton_mixin SingletonMixin Source code in griptape/mixins/singleton_mixin.py 4 5 6 7 8 9 10class SingletonMixin: _instance = None def __new__(cls, *args, **kwargs) -> SingletonMixin: if not cls._instance: cls._instance = super().__new__(cls, *args, **kwargs) # noqa: UP008 return cls._instance __new__(*args, **kwargs) Source code in griptape/mixins/singleton_mixin.py 7 8 9 10def __new__(cls, *args, **kwargs) -> SingletonMixin: if not cls._instance: cls._instance = super().__new__(cls, *args, **kwargs) # noqa: UP008 return cls._instance