code: def restart_process(self, pid):
          '''
          Create new process (assuming this one is dead), then remove the old one
          '''
          if self._restart_processes is False:
              return
          log.info(
              'Process %s (%s) died with exit status %s, restarting...',
              self._process_map[pid]['tgt'],
              pid,
              self._process_map[pid]['Process'].exitcode
          )
          # don't block, the process is already dead
          self._process_map[pid]['Process'].join(1)
  
          self.add_process(self._process_map[pid]['tgt'],
                           self._process_map[pid]['args'],
                           self._process_map[pid]['kwargs'])
  
          del self._process_map[pidf restart_process(self, pid):
          '''
          Create new process (assuming this one is dead), then remove the old one
          '''
          if self._restart_processes is False:
              return
          log.info(
              'Process %s (%s) died with exit status %s, restarting...',
              self._process_map[pid]['tgt'],
              pid,
              self._process_map[pid]['Process'].exitcode
          )
          # don't block, the process is already dead
          self._process_map[pid]['Process'].join(1)
  
          self.add_process(self._process_map[pid]['tgt'],
                           self._process_map[pid]['args'],
                           self._process_map[pid]['kwargs'])
  
          del self._process_map[pid]
docs: Create new process (assuming this one is dead), then remove the old one