code: def _setup_directories(self):
          
          dirs = [self._data_dir]
          dirs += [os.path.join(self._data_dir, name) for name
                   in self.DATA_SUBDIRS]
  
          for path in dirs:
              if not os.path.isdir(path):
                  try:
                      os.makedirs(path)  # recursive mkdir
                      os.chmod(path, 0755)  # rwxr-xr-x
  
                  except OSError:
                      raise errors.DirectorySetupFail()
  
          return True
docs: Creates data directory structure.
  
              * Raises a ``DirectorySetupFail`` exception if error occurs
                while creating directories.