<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_raw_datadir(self, directory=None):
 """Set the directory containing .res-files. Used for setting directory for looking for res-files.@ A valid directory name is required. Args: directory (str):
 path to res-directory Example: """


        if directory is None:
            self.logger.info("no directory name given")
            return
        if not os.path.isdir(directory):
            self.logger.info(directory)
            self.logger.info("directory does not exist")
            return
        self.raw_datadir = directory