code: def test_no_log_spam(self):
      if jtu.is_cloud_tpu() and xla_bridge._backends:
          raise self.skipTest(
              "test requires fresh process on Cloud TPU because only one process "
              "can use the TPU at a time"
          )
      if sys.executable is None:
          raise self.skipTest("test requires access to python binary")
  
      program = textwrap.dedent(
          """
        import jax
        jax.device_count()
        f = jax.jit(lambda x: x + 1)
        f(1)
        f(2)
        jax.numpy.add(1, 1)
      """
      )
      python = sys.executable
      assert "python" in python
      # Make sure C++ logging is at default level for the test process.
      proc = subprocess.run(
          [python, "-c", program],
          capture_output=True,
          env={"TF_CPP_MIN_LOG_LEVEL": "1"},
      )
  
      lines = proc.stdout.split(b"\n")
      lines.extend(proc.stderr.split(b"\n"))
      allowlist = [
          b"",
          b"An NVIDIA GPU may be present on this machine, but a CUDA-enabled "
          b"jaxlib is not installed. Falling back to cpu.",
      ]
      lines = [l for l in lines if l not in allowlist]
      self.assertEmpty(lines)
  
file_path: jax/tests/logging_test.py
imports: import contextlib
  import io
  import logging
  import platform
  import subprocess
  import sys
  import textwrap
  import unittest
  import jax
  from jax import config
  import jax._src.test_util
  from jax._src import xla_bridge
  from absl.testing import absltest
label_desc: Use image node_id 1 for calling the LoggingTest obj's underlying member method code with example usage: obj.test_no_log_spam() without return types