code: def test_should_log_returns_false_when_parrent_session_has_the_same_estimator():
      # This test case corresponds to when Pipeline.fit() calls Transformer.fit_transform()
      # which calls Transformer.fit()
      with _TrainingSession(PARENT, allow_children=True) as p:
          assert_session_stack([(None, PARENT)])
  
          with _TrainingSession(CHILD, allow_children=True) as c1:
              assert_session_stack([(None, PARENT), (PARENT, CHILD)])
  
              with _TrainingSession(CHILD, allow_children=True) as c2:
                  assert_session_stack(
                      [(None, PARENT), (PARENT, CHILD), (CHILD, CHILD)]
                  )
  
                  assert p.should_log()
                  assert c1.should_log()
                  assert not c2.should_log()
  
              assert_session_stack([(None, PARENT), (PARENT, CHILD)])
          assert_session_stack([(None, PARENT)])
      assert_session_stack([])
  
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 8 for calling a global function with example usage: test_should_log_returns_false_when_parrent_session_has_the_same_estimator() without return types