class_docstr: A decorator to realize nano_multiprocessing training on customized training step.
class_docstr_tok: ["A","decorator","to","realize","nano_multiprocessing","training","on","customized","training","step","."]
docstr: Run distribution strategy for multi-process training.
docstr_tok: ["Run","distribution","strategy","for","multi-process","training","."]
code: def __call__(self, *args, mirrored_strategy=None, **kwargs):
      """Run distribution strategy for multi-process training."""
      # TODO: to validate if we really could support kwargs
      per_replica_losses = mirrored_strategy.run(
          self.func, args=args, kwargs=kwargs
      )
      return mirrored_strategy.reduce(
          tf.distribute.ReduceOp.SUM, per_replica_losses, axis=None
      )
  
imports: import cloudpickle
  import tensorflow
  import numpy
  from functools import wraps, partial
  from tempfile import TemporaryDirectory
  import os
  import json
  from bigdl.nano.utils.common import schedule_processors
  from bigdl.nano.tf.keras.distributed_utils import _find_free_port
  from tensorflow.keras.losses import Loss
  import warnings
  from bigdl.nano.utils.common import invalidInputError
label_desc: Use image node_id 2 for calling the nano_multiprocessing obj's underlying member method code with example usage: obj.__call__() and returns: mirrored_strategy