code: def truncate_api_db():
      with get_contexted_session() as session:
          meta = ApiBase.metadata
          for table in reversed(meta.sorted_tables):
              session.execute(sa_text(f"DELETE FROM {table.name};"))
              session.commit()
  
imports: import datetime
  import itertools
  import os.path
  import shutil
  import numpy
  from PIL import Image
  from typing import Iterator
  import struct
  from sqlalchemy import text
  from aim.sdk.repo import Repo
  from aim.sdk.run import Run
  from aim.sdk.objects.image import Image
  from aim.storage.structured.sql_engine.models import Base
  from aim.web.api.db import get_contexted_session
  from aim.web.api.db import Base
label_desc: Use image node_id 4 for calling a global function with example usage: truncate_api_db() without return types