def METHOD_NAME(self):
    stdout, stderr = communicate(self.process)
    if stdout and (self.out == PIPE):
        self.log.debug("Output for %s:\n%s", self, stdout)
    if stderr and (self.err == PIPE):
        self.log.warning("Errors for %s:\n%s", self, stderr)
    self.log.debug("Task was finished with exit code %s: %s", self.process.returncode, self)
    if not self.ignore_failure and self.process.returncode != 0:
        if self.out != PIPE:
            self.log.warning("Output for %s:\n%s", self, stdout)
        raise CalledProcessError(self.process.returncode, self)