code: def upgrade():
      bind = op.get_bind()
      session = orm.Session(bind=bind)
  
      _describe_migration_if_necessary(session)
      all_latest_metrics = _get_latest_metrics_for_runs(session=session)
  
      op.create_table(
          SqlLatestMetric.__tablename__,
          Column("key", String(length=250)),
          Column("value", Float(precision=53), nullable=False),
          Column(
              "timestamp", BigInteger, default=lambda: int(time.time())
          ),
          Column("step", BigInteger, default=0, nullable=False),
          Column("is_nan", Boolean, default=False, nullable=False),
          Column(
              "run_uuid",
              String(length=32),
              ForeignKey("runs.run_uuid"),
              nullable=False,
          ),
          PrimaryKeyConstraint(
              "key", "run_uuid", name="latest_metric_pk"
          ),
      )
  
      session.add_all(
          [
              SqlLatestMetric(
                  run_uuid=run_uuid,
                  key=key,
                  step=step,
                  timestamp=timestamp,
                  value=value,
                  is_nan=is_nan,
              )
              for run_uuid, key, step, timestamp, value, is_nan in all_latest_metrics
          ]
      )
      session.commit()
  
      _logger.info("Migration complete!")
  
file_path: mlflow/mlflow/store/db_migrations/versions/89d4b8295536_create_latest_metrics_table.py
imports: import time
  import logging
  from alembic import op
  from sqlalchemy import orm, func, distinct, and_
  from sqlalchemy import Column, String, ForeignKey, Float, BigInteger, PrimaryKeyConstraint, Boolean
  from mlflow.store.tracking.dbmodels.models import SqlMetric, SqlLatestMetric
label_desc: Use image node_id 3 for calling a global function with example usage: upgrade() without return types