docstr: If there's existing model, load, sync, and resume.
  
          
docstr_tok: ["If","there","'s","existing","model",",","load",",","sync",",","and","resume","."]
code: def maybe_load(self, trainer, optimizer=None, path=None):
      """If there's existing model, load, sync, and resume."""
      if self.path is None:
          if path is not None:
              self.path = path
          else:
              self.path = trainer.out
  
      local_files = []
      try:
          local_files = os.listdir(self.path)
      except Exception:
          # Maybe I am the only process that does not have result
          # directory
          pass
      local_iters = filter(None, self._parse_filenames(local_files))
      local_iters = [
          i
          for name, rank, i in local_iters
          if name == self.name and rank == self.comm.rank
      ]
  
      self.files = self._filenames(local_iters)
      # Collect common file list
      self._sync_file_list()
  
      # Get set of common snapshot numbers (=iteration number)
      iters = [i for name, rank, i in self._parse_filenames(self.files)]
      if iters:
          # Adopt latest snapshot from iteration number
          i = max(iters)
  
          # Note that checkpointer only verifies file name - if
          # exception happens here, currently manual deletion of
          # *latest* snapshot may checkpointer work sanely against
          # one older snapshot
          _load(self.path, self._filename(i), trainer)
  
          if optimizer is not None:
              # If this is a complete resume, no broadcast is needed ^^;
              # 'complete resume' means all workers' snapshot is preserved,
              # so all workers can assume their loaded model is complete.
              # Otherwise _MultiNodeOptimizer broadcasts and shares data
              # from rank 0.
              optimizer.__setattr__("needs_broadcast", False)
  
imports: import errno
  import os
  import shutil
  import tempfile
  import time
  import warnings
  import chainer
  from chainer.training import extension
label_desc: Use image node_id 11 for calling the _MultiNodeCheckpointer obj's underlying member method code with example usage: obj.maybe_load(trainer, optimizer, path) without return types