code: def create_communicator(communicator_class, mpi_comm, use_gpu):
      if PureNcclCommunicator == communicator_class:
          use_nccl = True
      else:
          use_nccl = False
  
      if use_gpu and not use_nccl and nccl.get_build_version() < 2000:
          pytest.skip("This test requires NCCL version >= 2.0")
      communicator = communicator_class(mpi_comm)
      if use_gpu:
          chainer.cuda.get_device_from_id(communicator.intra_rank).use()
  
      return communicator
  
imports: import chainer
  from chainer.backends.cuda import cupy
  import chainer.testing
  import chainer.utils
  import mpi4py.MPI
  import numpy
  import pytest
  from chainermn.communicators.naive_communicator import NaiveCommunicator
  from chainermn.communicators.pure_nccl_communicator import PureNcclCommunicator
  from chainermn.links import MultiNodeBatchNormalization
  from chainermn import nccl
label_desc: Use image node_id 4 for calling a global function with example usage: create_communicator(communicator_class, mpi_comm, use_gpu) and returns: communicator