code: def test_timer(t):
      t.start()
      assert t.running is True
      time.sleep(1)
      t.stop()
      assert t.running is False
      assert t.interval == pytest.approx(1, abs=TOL)
      with Timer() as t2:
          assert t2.running is True
          time.sleep(1)
      assert t2.interval == pytest.approx(1, abs=TOL)
      assert t2.running is False
  
file_path: recommenders/tests/unit/recommenders/utils/test_timer.py
imports: import time
  import pytest
  from recommenders.utils.timer import Timer
label_desc: Use image node_id 5 for calling a global function with example usage: test_timer(t) without return types