def new_base(prefix: str) -> Type[T]:
    """Create a new base class for ORM classes.

    Note: This is a function to be able to define classes extending different
    SQLAlchemy declarative bases. Each different such bases has a different set
    of mappings from classes to table names. If we only had one of these, our
    code will never be able to have two different sets of mappings at the same
    time. We need to be able to have multiple mappings for performing things
    such as database migrations and database copying from one database
    configuration to another.
    """

    base = declarative_base()
    return type(
        f"BaseWithTablePrefix{prefix}",
        (base, BaseWithTablePrefix),
        {
            "_table_prefix": prefix,
            "__abstract__": True,  # stay abstract until _table_base_name is set in a subclass
        },
    )
Create a new base class for ORM classes.

    Note: This is a function to be able to define classes extending different
    SQLAlchemy declarative bases. Each different such bases has a different set
    of mappings from classes to table names. If we only had one of these, our
    code will never be able to have two different sets of mappings at the same
    time. We need to be able to have multiple mappings for performing things
    such as database migrations and database copying from one database
    configuration to another.
    
src/core/trulens/core/database/orm.py