def delete_singleton(
        obj: Type[SingletonPerNameMeta], name: Optional[str] = None
    ):
        """
        Delete the singleton instance. Can be used for testing to create another
        singleton.
        """
        cls_name = (
            getattr(obj.__class__, "__name__")
            if hasattr(obj.__class__, "__name__")
            else None
        )
        k = cls_name, name
        if k in SingletonPerNameMeta._singleton_instances:
            del SingletonPerNameMeta._singleton_instances[k]
        else:
            logger.warning("Instance %s not found:", obj)

        Delete the singleton instance. Can be used for testing to create another
        singleton.
        
src/core/trulens/core/utils/python.py