code: def prep_directory(self, target_dir):
          
          dirname = path.dirname(target_dir)
          if dirname:
              dirname = path.join(settings.BUILD_DIR, dirname)
              if not self.fs.exists(dirname):
                  logger.debug("Creating directory at {}{}".format(self.fs_name, dirname))
                  self.fs.makedirs(dirname)
docs: Prepares a new directory to store the file at the provided path, if needed.