code: def test_all_operators(op):
      m1 = Linear()
      m2 = Linear()
      with Model.define_operators({op: lambda a, b: a.name + b.name}):
          if op == "+":
              value = m1 + m2
          else:
              with pytest.raises(TypeError):
                  value = m1 + m2
          if op == "-":
              value = m1 - m2
          else:
              with pytest.raises(TypeError):
                  value = m1 - m2
  
          if op == "*":
              value = m1 * m2
          else:
              with pytest.raises(TypeError):
                  value = m1 * m2
  
          if op == "@":
              value = m1.__matmul__(m2)  # Be kind to Python 2...
          else:
              with pytest.raises(TypeError):
                  value = m1.__matmul__(m2)
  
          if op == "/":
              value = m1 / m2
          else:
              with pytest.raises(TypeError):
                  value = m1 / m2
  
          if op == "//":
              value = m1 // m2
          else:
              with pytest.raises(TypeError):
                  value = m1 // m2
          if op == "^":
              value = m1 ^ m2
          else:
              with pytest.raises(TypeError):
                  value = m1 ^ m2
          if op == "%":
              value = m1 % m2
          else:
              with pytest.raises(TypeError):
                  value = m1 % m2
          if op == "**":
              value = m1**m2
          else:
              with pytest.raises(TypeError):
                  value = m1**m2
          if op == "<<":
              value = m1 << m2
          else:
              with pytest.raises(TypeError):
                  value = m1 << m2
          if op == ">>":
              value = m1 >> m2
          else:
              with pytest.raises(TypeError):
                  value = m1 >> m2
          if op == "&":
              value = m1 & m2
          else:
              with pytest.raises(TypeError):
                  value = m1 & m2
          if op == "^":
              value = m1 ^ m2
          else:
              with pytest.raises(TypeError):
                  value = m1 ^ m2
          if op == "|":
              value = m1 | m2
          else:
              with pytest.raises(TypeError):
                  value = m1 | m2  # noqa: F841
      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 23 for calling a global function with example usage: test_all_operators(op) without return types