class_docstr: Callback for Early Stopping mechanism and checks if it training
  should continue or stop.
code: def on_validation_end(self, **kwargs):
      # Consolidate the state dict of sharded optimizers
      consolidate_optim_state_dict(self.trainer.optimizer)
      stop = self.early_stopping(
          self.trainer.num_updates,
          self.trainer.current_iteration,
          kwargs["meter"],
      )
      stop = bool(
          broadcast_scalar(stop, src=0, device=self.trainer.device)
      )
      return stop
  
imports: from mmf.trainers.callbacks.base import Callback
  from mmf.utils.checkpoint import consolidate_optim_state_dict
  from mmf.utils.distributed import broadcast_scalar
  from mmf.utils.early_stopping import EarlyStopping
label_desc: Use image node_id 2 for calling the EarlyStoppingCallback obj's underlying member method code with example usage: obj.on_validation_end() and returns: stop