code: def test_advisory_warnings(self):
      # testing `logger.warning_advice()`
  
      logger = logging.get_logger(
          "transformers.models.bart.tokenization_bart"
      )
      msg = "Testing 1, 2, 3"
  
      with mockenv_context(TRANSFORMERS_NO_ADVISORY_WARNINGS="1"):
          # nothing should be logged as env var disables this method
          with CaptureLogger(logger) as cl:
              logger.warning_advice(msg)
          self.assertEqual(cl.out, "")
  
      with mockenv_context(TRANSFORMERS_NO_ADVISORY_WARNINGS=""):
          # should log normally as TRANSFORMERS_NO_ADVISORY_WARNINGS is unset
          with CaptureLogger(logger) as cl:
              logger.warning_advice(msg)
          self.assertEqual(cl.out, msg + "\n")
  
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 5 for calling the HfArgumentParserTest obj's underlying member method code with example usage: obj.test_advisory_warnings() without return types