code: def remove_dirs(self, directory):
          
  
          LOG.info('Removing directory [ %s ]', directory)
          local_files = self._drectory_local_files(directory=directory)
          for file_name in local_files:
              try:
                  os.remove(file_name['local_object'])
              except OSError as exp:
                  LOG.error(str(exp))
  
          # Build a list of all local directories
          directories = sorted(
              [i for i, _, _ in os.walk(directory)],
              reverse=True
          )
  
          # Remove directories
          for directory_path in directories:
              try:
                  os.removedirs(directory_path)
              except OSError as exp:
                  if exp.errno != 2:
                      LOG.error(str(exp))
                  pass
docs: Delete a directory recursively.
  
          :param directory: $PATH to directory.
          :type directory: ``str``