code: def test_mixinmodel(app: Flask, model_class: t.Any) -> None:
      db = SQLAlchemy(app, model_class=model_class)
  
      if issubclass(db.Model, (sa_orm.MappedAsDataclass)):
  
          class TimestampMixin(sa_orm.MappedAsDataclass):
              created: sa_orm.Mapped[datetime] = sa_orm.mapped_column(
                  db.DateTime,
                  nullable=False,
                  insert_default=datetime.utcnow,
                  init=False,
              )
              updated: sa_orm.Mapped[datetime] = sa_orm.mapped_column(
                  db.DateTime,
                  insert_default=datetime.utcnow,
                  onupdate=datetime.utcnow,
                  init=False,
              )
  
          class Post(TimestampMixin, db.Model):
              id: sa_orm.Mapped[int] = sa_orm.mapped_column(
                  db.Integer, primary_key=True, init=False
              )
              title: sa_orm.Mapped[str] = sa_orm.mapped_column(
                  db.String, nullable=False
              )
  
      elif issubclass(
          db.Model,
          (sa_orm.DeclarativeBase, sa_orm.DeclarativeBaseNoMeta),
      ):
  
          class TimestampMixin:  # type: ignore[no-redef]
              created: sa_orm.Mapped[datetime] = sa_orm.mapped_column(
                  db.DateTime, nullable=False, default=datetime.utcnow
              )
              updated: sa_orm.Mapped[datetime] = sa_orm.mapped_column(
                  db.DateTime,
                  default=datetime.utcnow,
                  onupdate=datetime.utcnow,
              )
  
          class Post(TimestampMixin, db.Model):  # type: ignore[no-redef]
              id: sa_orm.Mapped[int] = sa_orm.mapped_column(
                  db.Integer, primary_key=True
              )
              title: sa_orm.Mapped[str] = sa_orm.mapped_column(
                  db.String, nullable=False
              )
  
      else:
  
          class TimestampMixin:  # type: ignore[no-redef]
              created = db.Column(
                  db.DateTime, nullable=False, default=datetime.utcnow
              )
              updated = db.Column(
                  db.DateTime,
                  onupdate=datetime.utcnow,
                  default=datetime.utcnow,
              )
  
          class Post(TimestampMixin, db.Model):  # type: ignore[no-redef]
              id = db.Column(db.Integer, primary_key=True)
              title = db.Column(db.String, nullable=False)
  
      db.create_all()
      db.session.add(Post(title="Admin Post"))
      db.session.commit()
      post = db.session.execute(db.select(Post)).scalar()
      assert post is not None
      assert post.created is not None
      assert post.updated is not None
  
imports: from __future__ import annotations
  import typing
  from datetime import datetime
  import pytest
  import sqlalchemy
  import sqlalchemy.exc
  import sqlalchemy.orm
  from flask import Flask
  from flask_sqlalchemy import SQLAlchemy
  from flask_sqlalchemy.model import DefaultMeta
  from flask_sqlalchemy.model import Model
label_desc: Use image node_id 10 for calling a global function with example usage: test_mixinmodel(app, model_class) without return types