code: def get_n_iterations_for_one_epoch(dataset, local_batch_size, comm):
      """Get the number of iterations for one epoch.
  
      .. note::
  
          This API is deprecated. Please use standard epoch triggers.
  
      Args:
          dataset: Sub dataset of each worker.
          local_batch_size (int): Batch size of each worker.
          comm: ChainerMN communicator or MPI4py communicator.
  
      Returns:
          int: the number of iterations for one epoch.
      """
  
      warnings.warn(
          "get_n_iterations_for_one_epoch is deprecated. Please use "
          "standard epoch triggers.",
          DeprecationWarning,
      )
  
      n_iterations = None
      if comm.rank == 0:
          n_iterations = (
              len(dataset) + local_batch_size - 1
          ) // local_batch_size
      return comm.bcast_obj(n_iterations)
  
file_path: chainer/chainermn/datasets/scatter.py
imports: import warnings
  import chainer.datasets
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: get_n_iterations_for_one_epoch(dataset, local_batch_size, comm) and returns: comm