def METHOD_NAME():
    """
    Sets up an object to keep track of the scope consumers ( consumers that will only
    be created once per test session).
    """
    all_consumers: MutableMapping[str, Optional[Consumer]] = {
        # Relay is configured to use this topic for all ingest messages. See
        # `templates/config.yml`.
        "ingest-events": None,
        "outcomes": None,
    }
    yield all_consumers
    for consumer_name, consumer in all_consumers.items():
        if consumer is not None:
            try:
                # stop the consumer
                consumer.signal_shutdown()
                consumer.run()
            except:  # noqa:
                _log.warning("Failed to cleanup consumer %s", consumer_name)