code: def test_integration(self):
      level_origin = logging.get_verbosity()
  
      logger = logging.get_logger(
          "transformers.models.bart.tokenization_bart"
      )
      msg = "Testing 1, 2, 3"
  
      # should be able to log warnings (if default settings weren't overridden by `pytest --log-level-all`)
      if level_origin <= logging.WARNING:
          with CaptureLogger(logger) as cl:
              logger.warning(msg)
          self.assertEqual(cl.out, msg + "\n")
  
      # this is setting the level for all of `transformers.*` loggers
      logging.set_verbosity_error()
  
      # should not be able to log warnings
      with CaptureLogger(logger) as cl:
          logger.warning(msg)
      self.assertEqual(cl.out, "")
  
      # should be able to log warnings again
      logging.set_verbosity_warning()
      with CaptureLogger(logger) as cl:
          logger.warning(msg)
      self.assertEqual(cl.out, msg + "\n")
  
      # 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 2 for calling the HfArgumentParserTest obj's underlying member method code with example usage: obj.test_integration() without return types