def __call__(cls, *args, name: Optional[str] = None, **kwargs):
        """
        Create the singleton instance if it doesn't already exist and return it.
        """
        k = f"{cls.__module__}.{cls.__name__}", name

        if k not in cls._singleton_instances:
            logger.debug(
                "Creating new %s singleton instance for name = %s.",
                cls.__name__,
                name,
            )
            cls._singleton_instances[k] = super(
                SingletonPerNameMeta, cls
            ).__call__(*args, **kwargs)
        elif args or kwargs:
            logger.warning(
                "Singleton instance %s already exists for name = %s.",
                cls.__name__,
                name,
            )
        return cls._singleton_instances[k]

        Create the singleton instance if it doesn't already exist and return it.
        
src/core/trulens/core/utils/python.py