code: def reset_global_states():
      from mlflow.utils.autologging_utils import (
          AUTOLOGGING_INTEGRATIONS,
      )
  
      for value in AUTOLOGGING_INTEGRATIONS.values():
          value.clear()
  
      for integration_name in library_to_mlflow_module:
          try:
              del mlflow.utils.import_hooks._post_import_hooks[
                  integration_name.__name__
              ]
          except Exception:
              pass
  
      assert all(v == {} for v in AUTOLOGGING_INTEGRATIONS.values())
      assert mlflow.utils.import_hooks._post_import_hooks == {}
  
      yield
  
      for value in AUTOLOGGING_INTEGRATIONS.values():
          value.clear()
  
      for integration_name in library_to_mlflow_module:
          try:
              del mlflow.utils.import_hooks._post_import_hooks[
                  integration_name.__name__
              ]
          except Exception:
              pass
  
      # TODO: Remove this when we remove the `mlflow.gluon` module
      mlflow.utils.import_hooks._post_import_hooks.pop(
          "mxnet.gluon", None
      )
  
      assert all(v == {} for v in AUTOLOGGING_INTEGRATIONS.values())
      assert mlflow.utils.import_hooks._post_import_hooks == {}
  
imports: import sys
  from collections import namedtuple
  from io import StringIO
  from unittest import mock
  import fastai
  import lightgbm
  import pyspark
  import pyspark.ml
  import pytest
  import pytorch_lightning
  import setfit
  import sklearn
  import statsmodels
  import tensorflow
  import transformers
  import xgboost
  import mlflow
  from mlflow.utils.autologging_utils import AutologgingEventLogger, autologging_is_disabled, get_autologging_config
  from tests.autologging.fixtures import reset_stderr, test_mode_off, test_mode_on
label_desc: Use image node_id 1 for calling a global function with example usage: reset_global_states() without return types