code: def test_profilers_wrong_inputs():
      profiler = BasicTimeProfiler()
      with pytest.raises(
          TypeError,
          match=r"Argument engine should be ignite.engine.Engine",
      ):
          profiler.attach(None)
  
      with pytest.raises(
          ModuleNotFoundError,
          match=r"Need pandas to write results as files",
      ):
          with patch.dict("sys.modules", {"pandas": None}):
              profiler.write_results("")
  
      profiler = HandlersTimeProfiler()
      with pytest.raises(
          TypeError,
          match=r"Argument engine should be ignite.engine.Engine",
      ):
          profiler.attach(None)
  
      with pytest.raises(
          ModuleNotFoundError,
          match=r"Need pandas to write results as files",
      ):
          with patch.dict("sys.modules", {"pandas": None}):
              profiler.write_results("")
  
imports: import sys
  import time
  from unittest.mock import patch
  import pytest
  from pytest import approx
  from ignite.engine import Engine, EventEnum, Events
  from ignite.handlers.time_profilers import BasicTimeProfiler, HandlersTimeProfiler
label_desc: Use image node_id 4 for calling a global function with example usage: test_profilers_wrong_inputs() without return types