code: def test_no_distrib(capsys):
      assert idist.backend() is None
      if torch.cuda.is_available():
          assert idist.device().type == "cuda"
      elif _torch_version_le_112 and torch.backends.mps.is_available():
          assert idist.device().type == "mps"
      else:
          assert idist.device().type == "cpu"
      assert idist.get_rank() == 0
      assert idist.get_world_size() == 1
      assert idist.get_local_rank() == 0
      assert idist.model_name() == "serial"
  
      from ignite.distributed.utils import _model, _SerialModel
  
      _sanity_check()
      assert isinstance(_model, _SerialModel)
  
      idist.show_config()
      captured = capsys.readouterr()
      out = captured.err.split("\r")
      out = list(map(lambda x: x.strip(), out))
      out = list(filter(None, out))
      assert (
          "ignite.distributed.utils INFO: distributed configuration: serial"
          in out[-1]
      )
      assert "ignite.distributed.utils INFO: backend: None" in out[-1]
      if torch.cuda.is_available():
          assert (
              "ignite.distributed.utils INFO: device: cuda" in out[-1]
          )
      elif _torch_version_le_112 and torch.backends.mps.is_available():
          assert "ignite.distributed.utils INFO: device: mps" in out[-1]
      else:
          assert "ignite.distributed.utils INFO: device: cpu" in out[-1]
      assert "ignite.distributed.utils INFO: rank: 0" in out[-1]
      assert "ignite.distributed.utils INFO: local rank: 0" in out[-1]
      assert "ignite.distributed.utils INFO: world size: 1" in out[-1]
  
file_path: ignite/tests/ignite/distributed/utils/test_serial.py
imports: import torch
  import ignite.distributed
  from ignite.distributed.comp_models.base import _torch_version_le_112
  from tests.ignite.distributed.utils import _sanity_check, _test_distrib__get_max_length, _test_distrib_all_gather, _test_distrib_all_reduce, _test_distrib_barrier, _test_distrib_broadcast, _test_distrib_new_group, _test_sync
label_desc: Use image node_id 1 for calling a global function with example usage: test_no_distrib(capsys) without return types