code: def _teardown_each_tables(self):
      if self.run_define_tables == "each":
          self.tables.clear()
          if self.run_create_tables == "each":
              drop_all_tables_from_metadata(
                  self._tables_metadata, self.bind
              )
          self._tables_metadata.clear()
      elif self.run_create_tables == "each":
          drop_all_tables_from_metadata(
              self._tables_metadata, self.bind
          )
  
      savepoints = getattr(config.requirements, "savepoints", False)
      if savepoints:
          savepoints = savepoints.enabled
  
      # no need to run deletes if tables are recreated on setup
      if (
          self.run_define_tables != "each"
          and self.run_create_tables != "each"
          and self.run_deletes == "each"
      ):
          with self.bind.begin() as conn:
              for table in reversed(
                  [
                      t
                      for (t, fks) in sort_tables_and_constraints(
                          self._tables_metadata.tables.values()
                      )
                      if t is not None
                  ]
              ):
                  try:
                      if savepoints:
                          with conn.begin_nested():
                              conn.execute(table.delete())
                      else:
                          conn.execute(table.delete())
                  except sa.exc.DBAPIError as ex:
                      print(
                          ("Error emptying table %s: %r" % (table, ex)),
                          file=sys.stderr,
                      )
  
imports: from __future__ import annotations
  import itertools
  import random
  import re
  import sys
  import sqlalchemy
  from .base import TestBase
  from ..None import config
  from ..None import mock
  from ..assertions import eq_
  from ..assertions import ne_
  from ..util import adict
  from ..util import drop_all_tables_from_metadata
  from ...None import event
  from ...None import util
  from ...schema import sort_tables_and_constraints
  from ...sql import visitors
  from ...sql.elements import ClauseElement
label_desc: Use image node_id 9 for calling the TablesTest obj's underlying member method code with example usage: obj._teardown_each_tables() without return types