code: def block(self):
          
          if self._uses_subprocess:
              # consume stdout and stderr
              try:
                  stdout, stderr = self.subprocess.communicate()
                  self.__out = stdout
                  self.__err = stderr
              except ValueError:
                  pass  # Don't read from finished subprocesses.
          else:
              self.subprocess.wait()
docs: Blocks until process is complete.