code: def test_set_level(self):
      logger = logging.get_logger()
  
      # the current default level is logging.WARNING
      level_origin = logging.get_verbosity()
  
      logging.set_verbosity_error()
      self.assertEqual(
          logger.getEffectiveLevel(), logging.get_verbosity()
      )
  
      logging.set_verbosity_warning()
      self.assertEqual(
          logger.getEffectiveLevel(), logging.get_verbosity()
      )
  
      logging.set_verbosity_info()
      self.assertEqual(
          logger.getEffectiveLevel(), logging.get_verbosity()
      )
  
      logging.set_verbosity_debug()
      self.assertEqual(
          logger.getEffectiveLevel(), logging.get_verbosity()
      )
  
      # restore to the original level
      logging.set_verbosity(level_origin)
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/tests/utils/test_logging.py
imports: import os
  import unittest
  import transformers.models.bart.tokenization_bart
  from huggingface_hub.utils import are_progress_bars_disabled
  from transformers import logging
  from transformers.testing_utils import CaptureLogger, mockenv, mockenv_context
  from transformers.utils.logging import disable_progress_bar, enable_progress_bar
label_desc: Use image node_id 1 for calling the HfArgumentParserTest obj's underlying member method code with example usage: obj.test_set_level() without return types