code: def test_critical_once(self):
      self.logger.critical_once(self._msg)
      self.logger.critical_once(self._msg)
  
      with open(self.test_log_file, "r") as f:
          assert len(f.readlines()) == 1
  
file_path: allennlp/tests/common/logging_test.py
imports: import os
  import logging
  import random
  from allennlp.common.logging import AllenNlpLogger, prepare_global_logging
  from allennlp.common.testing import AllenNlpTestCase
  from allennlp.common.tqdm import Tqdm
label_desc: Use image node_id 6 for calling the TestLogging obj's underlying member method code with example usage: obj.test_critical_once() without return types