code: def setup_test_methods(request):
      from sqlalchemy.testing import asyncio
  
      # called for each test
  
      self = request.instance
  
      # before this fixture runs:
  
      # 1. function level "autouse" fixtures under py3k (examples: TablesTest
      #    define tables / data, MappedTest define tables / mappers / data)
  
      # 2. was for p2k. no longer applies
  
      # 3. run outer xdist-style setup
      if hasattr(self, "setup_test"):
          asyncio._maybe_async(self.setup_test)
  
      # alembic test suite is using setUp and tearDown
      # xdist methods; support these in the test suite
      # for the near term
      if hasattr(self, "setUp"):
          asyncio._maybe_async(self.setUp)
  
      # inside the yield:
      # 4. function level fixtures defined on test functions themselves,
      #    e.g. "connection", "metadata" run next
  
      # 5. pytest hook pytest_runtest_call then runs
  
      # 6. test itself runs
  
      yield
  
      # yield finishes:
  
      # 7. function level fixtures defined on test functions
      #    themselves, e.g. "connection" rolls back the transaction, "metadata"
      #    emits drop all
  
      # 8. pytest hook pytest_runtest_teardown hook runs, this is associated
      #    with fixtures close all sessions, provisioning.stop_test_class(),
      #    engines.testing_reaper -> ensure all connection pool connections
      #    are returned, engines created by testing_engine that aren't the
      #    config engine are disposed
  
      asyncio._maybe_async(plugin_base.after_test_fixtures, self)
  
      # 10. run xdist-style teardown
      if hasattr(self, "tearDown"):
          asyncio._maybe_async(self.tearDown)
  
      if hasattr(self, "teardown_test"):
          asyncio._maybe_async(self.teardown_test)
  
imports: from __future__ import annotations
  import argparse
  import collections
  from functools import update_wrapper
  import inspect
  import itertools
  import operator
  import os
  import re
  import sys
  from typing import TYPE_CHECKING
  import uuid
  import pytest
label_desc: Use image node_id 19 for calling a global function with example usage: setup_test_methods(request) without return types