code: def test_barebones_argument_selection(caplog):
      with caplog.at_level(logging.INFO):
          trainer = Trainer(barebones=True)
  
      assert "running in `Trainer(barebones=True)` mode" in caplog.text
      assert trainer.barebones
      assert not trainer.checkpoint_callbacks
      assert not trainer.loggers
      assert not trainer.progress_bar_callback
      assert not any(
          isinstance(cb, ModelSummary) for cb in trainer.callbacks
      )
      assert not trainer.log_every_n_steps
      assert not trainer.num_sanity_val_steps
      assert not trainer.fast_dev_run
      assert not trainer._detect_anomaly
      assert isinstance(trainer.profiler, PassThroughProfiler)
  
file_path: pytorch-lightning/tests/tests_pytorch/trainer/flags/test_barebones.py
imports: import logging
  import pytest
  from lightning.pytorch import Trainer
  from lightning.pytorch.callbacks import ModelSummary
  from lightning.pytorch.demos.boring_classes import BoringModel
  from lightning.pytorch.profilers import PassThroughProfiler
label_desc: Use image node_id 2 for calling a global function with example usage: test_barebones_argument_selection(caplog) without return types