<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def daemonize(self):
 """Double fork and set the pid."""

        self._double_fork()

        # Write pidfile.
        self.pid = os.getpid()

        LOG.info(
            "Succesfully daemonized process {0}.".format(self.pid)
        )