<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def close(self):
 """ Close the ACE process and return the process's exit code. """

        self.run_info['end'] = datetime.now()
        self._p.stdin.close()
        for line in self._p.stdout:
            if line.startswith('NOTE: tsdb run:'):
                self._read_run_info(line)
            else:
                logging.debug('ACE cleanup: {}'.format(line.rstrip()))
        retval = self._p.wait()
        return retval