code: def test_session_is_active():
      assert not _TrainingSession.is_active()
      with _TrainingSession(PARENT, allow_children=True):
          assert _TrainingSession.is_active()
  
          with _TrainingSession(CHILD, allow_children=False):
              assert _TrainingSession.is_active()
  
          assert _TrainingSession.is_active()
  
      assert_session_stack([])
      assert not _TrainingSession.is_active()
  
file_path: mlflow/tests/autologging/test_training_session.py
imports: import pytest
  from mlflow.utils.autologging_utils import _get_new_training_session_class
label_desc: Use image node_id 6 for calling a global function with example usage: test_session_is_active() without return types