code: def test_ioff():
      plt.ion()
      assert mpl.is_interactive()
      with plt.ioff():
          assert not mpl.is_interactive()
      assert mpl.is_interactive()
  
      plt.ioff()
      assert not mpl.is_interactive()
      with plt.ioff():
          assert not mpl.is_interactive()
      assert not mpl.is_interactive()
  
imports: import difflib
  import numpy
  import sys
  from pathlib import Path
  import pytest
  import matplotlib
  from matplotlib.testing import subprocess_run_for_testing
  from matplotlib import pyplot
label_desc: Use image node_id 6 for calling a global function with example usage: test_ioff() without return types