code: def _set_mode(self):
          
          if self.mode is not None:
              logger.debug("changing permission bits of %s to %s", self.path, oct(self.mode))
              os.chmod(self.path, self.mode)
docs: set permission bits if needed using python API os.chmod
  
          :return: None