code: def restart(self, all=False):
          
  
          if all:
              data = {'type': self.type}
  
          else:
              data = {'ps': self.process}
  
          r = self._h._http_resource(
              method='POST',
              resource=('apps', self.app.name, 'ps', 'restart'),
              data=data
          )
  
          r.raise_for_status()
docs: Restarts the given process.