code: def test_nested_context():
      ctx1_data = {"max_dur": 30}
      ctx2_data = {"max_steps": 5}
      ctx1 = StepwiseContext(**ctx1_data)
      ctx2 = StepwiseContext(**ctx2_data)
  
      with ctx1, ctx2:
          effective_ctx_data = ContextStore.get_or_empty(
              ContextType.STEPWISE
          )
          expected_ctx_data = ctx1_data.copy()
          expected_ctx_data.update(ctx2_data)
  
          assert all(
              effective_ctx_data[key] == expected_ctx_data[key]
              for key in expected_ctx_data.keys()
          )
  
          assert all(
              effective_ctx_data[key] == expected_ctx_data[key]
              for key in effective_ctx_data.keys()
          )
  
file_path: pmdarima/pmdarima/arima/tests/test_context.py
imports: from pmdarima.arima.auto import StepwiseContext, auto_arima
  from pmdarima.arima._context import ContextStore, ContextType
  from pmdarima.arima import _context
  from pmdarima.datasets import load_lynx, load_wineind
  from unittest import mock
  import threading
  import collections
  import pytest
  import warnings
label_desc: Use image node_id 3 for calling a global function with example usage: test_nested_context() without return types