code: def test_rank_zero_only__rank_0() -> None:
      @dist.rank_zero_only
      def fn():
          return 0
  
      assert fn() == 0
  
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 1 for calling a global function with example usage: test_rank_zero_only__rank_0() and returns: int