code: def create_communicator(gpu, param):
      if gpu:
          communicator = chainermn.create_communicator("flat")
          device = communicator.intra_rank
          chainer.cuda.get_device_from_id(device).use()
      else:
          communicator = chainermn.create_communicator("naive")
  
      if communicator.size < 2:
          pytest.skip("This test is for multinode")
  
      return communicator
  
imports: import functools
  import chainer
  import copy
  from chainer.backends.cuda import cupy
  import chainer.testing
  import chainer.testing.attr
  import numpy
  import pytest
  import chainermn
  from chainer.functions import sigmoid
  from chainer.functions import mean_squared_error
label_desc: Use image node_id 1 for calling a global function with example usage: create_communicator(gpu, param) and returns: communicator