code: def test_ctx_mgr_restores(self):
      # test that print options are actually restrored
      opts = np.get_printoptions()
      with np.printoptions(
          precision=opts["precision"] - 1,
          linewidth=opts["linewidth"] - 4,
      ):
          pass
      assert_equal(np.get_printoptions(), opts)
  
imports: import sys
  import gc
  from hypothesis import given
  from hypothesis.extra import numpy
  import pytest
  import numpy
  from numpy.testing import assert_, assert_equal, assert_raises, assert_warns, HAS_REFCOUNT, assert_raises_regex
  from numpy.core.arrayprint import _typelessdata
  import textwrap
label_desc: Use image node_id 2 for calling the TestContextManager obj's underlying member method code with example usage: obj.test_ctx_mgr_restores() without return types