original_docstring: 
          When process down is detected,
          :param proc_indices: indices of processes in Mars Worker
          
docstring: When process down is detected.
docstring_tokens: When process down is detected .
code: def handle_process_down(self, proc_indices):
          """
          When process down is detected,
          :param proc_indices: indices of processes in Mars Worker
          """
          # invoke registered callbacks for processes
          for cb in self._proc_callbacks:
              uid, addr, func = cb
              ref = self.ctx.actor_ref(uid, address=addr)
              getattr(ref, func)(proc_indices, _tell=True)
  
          # recreate actors given previous records
          refs = set()
          for proc_idx in proc_indices:
              for actor_args in self._proc_actors[proc_idx].values():
                  ref_key, args, kw, is_child = actor_args
                  refs.add(ref_key)
                  if not is_child:
                      self.ctx.create_actor(*args, **kw)
  
          # invoke registered callbacks for actors
          for cb in self._actor_callbacks:
              uid, addr, func = cb
              ref = self.ctx.actor_ref(uid, address=addr)
              clean_refs = [self.ctx.actor_ref(u, address=None) for u, _ in refs] \
                  + [self.ctx.actor_ref(u, address=a) for u, a in refs]
              getattr(ref, func)(clean_refs, _tell=True)
code_tokens: def handle_process_down ( self , proc_indices ) : for cb in self . _proc_callbacks : uid , addr , func = cb ref = self . ctx . actor_ref ( uid , address = addr ) getattr ( ref , func ) ( proc_indices , _tell = True ) refs = set ( ) for proc_idx in proc_indices : for actor_args in self . _proc_actors [ proc_idx ] . values ( ) : ref_key , args , kw , is_child = actor_args refs . add ( ref_key ) if not is_child : self . ctx . create_actor ( * args , ** kw ) for cb in self . _actor_callbacks : uid , addr , func = cb ref = self . ctx . actor_ref ( uid , address = addr ) clean_refs = [ self . ctx . actor_ref ( u , address = None ) for u , _ in refs ] + [ self . ctx . actor_ref ( u , address = a ) for u , a in refs ] getattr ( ref , func ) ( clean_refs , _tell = True )
short_docstring: When process down is detected,
short_docstring_tokens: When process down is detected
comment: """
          When process down is detected,
          :param proc_indices: indices of processes in Mars Worker
          """$SEP$# invoke registered callbacks for processes$SEP$# recreate actors given previous records$SEP$# invoke registered callbacks for actors