code: def clean_up_leaked_runs():
      """
      Certain test cases validate safety API behavior when runs are leaked. Leaked runs that
      are not cleaned up between test cases may result in cascading failures that are hard to
      debug. Accordingly, this fixture attempts to end any active runs it encounters and
      throws an exception (which reported as an additional error in the pytest execution output).
      """
      try:
          yield
          assert (
              not mlflow.active_run()
          ), "test case unexpectedly leaked a run. Run info: {}. Run data: {}".format(
              mlflow.active_run().info, mlflow.active_run().data
          )
      finally:
          while mlflow.active_run():
              mlflow.end_run()
  
imports: import inspect
  import os
  import shutil
  import subprocess
  from unittest import mock
  import pytest
  import mlflow
  from mlflow.tracking._tracking_service.utils import _use_tracking_uri
  from mlflow.utils.file_utils import path_to_local_sqlite_uri
  from mlflow.utils.os import is_windows
  from tests.autologging.fixtures import enable_test_mode
label_desc: Use image node_id 4 for calling a global function with example usage: clean_up_leaked_runs() without return types