code: def test_time_range_err(self):
      push_patch = mock.patch("cupy.cuda.nvtx.RangePush")
      pop_patch = mock.patch("cupy.cuda.nvtx.RangePop")
      with push_patch as push, pop_patch as pop:
          try:
              with prof.time_range("test:time_range_error", -1):
                  raise Exception()
          except Exception:
              pass
          push.assert_called_once_with("test:time_range_error", -1)
          pop.assert_called_once_with()
  
file_path: cupy/tests/cupy_tests/prof_tests/test_range.py
imports: import unittest
  from unittest import mock
  from cupy import cuda
  from cupy import prof
label_desc: Use image node_id 3 for calling the TestTimeRange obj's underlying member method code with example usage: obj.test_time_range_err() without return types