code: def test_nested_operator_contexts():
      m1 = create_model(name="a")
      m2 = create_model(name="b")
      assert Model._context_operators.get() == {}
      with Model.define_operators({"+": lambda a, b: a.name + b.name}):
          value = m1 + m2
          with pytest.raises(TypeError):
              value = m1 * m2
          with Model.define_operators(
              {"*": lambda a, b: a.name + b.name}
          ):
              with pytest.raises(TypeError):
                  value = m1 + m2
              value = m1 * m2
              with Model.define_operators(
                  {"-": lambda a, b: a.name + b.name}
              ):
                  with pytest.raises(TypeError):
                      value = m1 + m2
                  value = m1 - m2
              with pytest.raises(TypeError):
                  value = m1 + m2
              value = m1 * m2
          value = m1 + m2
          with pytest.raises(TypeError):
              value = m1 * m2
      assert value == "ab"
      assert Model._context_operators.get() == {}
  
imports: import threading
  import time
  from collections import Counter
  import numpy
  import pytest
  from thinc.api import Adam, CupyOps, Dropout, Linear, Model, Relu, Shim, Softmax, chain, change_attr_values, concatenate, set_dropout_rate, use_ops, with_debug, wrap_model_recursive
  from thinc.compat import has_cupy_gpu
  from ..util import make_tempdir
label_desc: Use image node_id 22 for calling a global function with example usage: test_nested_operator_contexts() without return types