code: def test_arithm_op_context_manager_deep_nested():
      tl_1 = tensors.TensorListCPU(np.ones((8, 16, 16)))
      tl_2 = tensors.TensorListCPU(np.ones((8, 16, 16)))
      expected_sum = np.full(shape=(8, 16, 16), fill_value=2)
  
      eager.arithmetic(True)
  
      assert np.array_equal((tl_1 + tl_2).as_array(), expected_sum)
  
      with eager.arithmetic(False):
          with assert_raises(
              TypeError, glob="unsupported operand type*"
          ):
              tl_1 + tl_2
  
          with eager.arithmetic(True):
              np.array_equal((tl_1 + tl_2).as_array(), expected_sum)
  
              with eager.arithmetic(False):
                  with assert_raises(
                      TypeError, glob="unsupported operand type*"
                  ):
                      tl_1 + tl_2
  
          with assert_raises(
              TypeError, glob="unsupported operand type*"
          ):
              tl_1 + tl_2
  
      assert np.array_equal((tl_1 + tl_2).as_array(), expected_sum)
      eager.arithmetic(False)
  
file_path: DALI/dali/test/python/test_eager_operators.py
imports: import numpy
  import os
  from nvidia.dali import fn
  from nvidia.dali import pipeline_def
  from nvidia.dali import ops
  from nvidia.dali import tensors
  from nvidia.dali.experimental import eager
  from nose_utils import assert_raises, raises
  from test_utils import get_dali_extra_path
label_desc: Use image node_id 6 for calling a global function with example usage: test_arithm_op_context_manager_deep_nested() without return types