code: def test_print_rank_zero(capsys: CaptureFixture[str]) -> None:
      dist.print_rank_zero("message")
      assert capsys.readouterr().out == "message\n"
  
file_path: lightly/tests/utils/test_dist.py
imports: import unittest
  from unittest import mock
  import torch
  from pytest import CaptureFixture
  from lightly.utils import dist
label_desc: Use image node_id 3 for calling a global function with example usage: test_print_rank_zero(capsys) without return types