<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clean(self, remove_working_directory=True):
 """ Remove the temporary directory. If ``remove_working_directory`` is ``True`` remove the working directory as well, otherwise just remove the temporary directory. :param bool remove_working_directory: if ``True``, remove the working directory as well """

        if remove_working_directory is not None:
            self.log(u"Removing working directory... ")
            gf.delete_directory(self.working_directory)
            self.working_directory = None
            self.log(u"Removing working directory... done")
        self.log(u"Removing temporary directory... ")
        gf.delete_directory(self.tmp_directory)
        self.tmp_directory = None
        self.log(u"Removing temporary directory... done")