code: def test_smoke_wrapper():
      rs = [
          [0, 1],
      ]
      comm = create_communicator("naive")
      if comm.size < 2:
          pytest.skip()
  
      snapshot = extensions.snapshot()
      filename = "{}.{}".format(snapshot.filename, comm.rank)
  
      replica_sets = rs
      mn_snapshot = multi_node_snapshot(comm, snapshot, replica_sets)
      if comm.rank == 0:
          assert mn_snapshot.is_master
          assert filename == mn_snapshot.snapshot.filename
      elif comm.rank == 1:
          assert not mn_snapshot.is_master
      elif comm.rank == 2:
          assert mn_snapshot.is_master
          assert filename == mn_snapshot.snapshot.filename
      else:
          assert not mn_snapshot.is_master
  
      comm.finalize()
  
imports: import mock
  import tempfile
  import pytest
  import chainer
  import chainer.links
  import chainer.functions
  from chainer.training import extensions
  from chainer.training import StandardUpdater
  from chainer.training import Trainer
  import chainermn
  from chainermn import create_communicator
  from chainermn.extensions import multi_node_snapshot
  from chainermn.extensions import _multi_node_snapshot
label_desc: Use image node_id 2 for calling a global function with example usage: test_smoke_wrapper() without return types