code: def test_flags(self):
      for flag in (settings.debug, settings.propagate_grads):
          self.assertFalse(flag.on())
          self.assertTrue(flag.off())
          with flag(True):
              self.assertTrue(flag.on())
              self.assertFalse(flag.off())
          self.assertFalse(flag.on())
          self.assertTrue(flag.off())
  
file_path: botorch/test/test_settings.py
imports: import warnings
  import gpytorch.settings
  import linear_operator.settings
  from botorch import settings
  from botorch.exceptions import BotorchWarning
  from botorch.utils.testing import BotorchTestCase
label_desc: Use image node_id 1 for calling the TestSettings obj's underlying member method code with example usage: obj.test_flags() without return types