def METHOD_NAME(config):
    # last pytest lifecycle hook (before pytest exits)
    _trigger_stop()
    # wait for localstack to stop. We do not want to exit immediately, otherwise new threads during shutdown will fail
    if not localstack_stopped.wait(timeout=10):
        logger.warning("LocalStack did not exit in time!")