class_docstr: Container for the extracted archive
      
class_docstr_tok: ["Container","for","the","extracted","archive"]
code: def clean(self, force=False):
      # would interfere with tests
      # if os.environ.get('DATALAD_TESTS_TEMP_KEEP'):
      #     lgr.info("As instructed, not cleaning up the cache under %s"
      #              % self._path)
      #     return
  
      for path, name in [
          (self._path, "cache"),
          (self.stamp_path, "stamp file"),
      ]:
          if exists(path):
              if (not self._persistent) or force:
                  lgr.debug(
                      "Cleaning up the %s for %s under %s",
                      name,
                      self._archive,
                      path,
                  )
                  # TODO:  we must be careful here -- to not modify permissions of files
                  #        only of directories
                  (rmtree if isdir(path) else unlink)(path)
  
imports: import hashlib
  import logging
  import os
  import random
  import string
  import tempfile
  from datalad import cfg
  from datalad.config import anything2bool
  from datalad.consts import ARCHIVES_TEMP_DIR
  from datalad.support.external_versions import external_versions
  from datalad.support.locking import lock_if_check_fails
  from datalad.support.path import abspath, exists, isabs, isdir
  from datalad.support.path import join
  from datalad.support.path import normpath, pardir, relpath
  from datalad.support.path import sep
  from datalad.utils import Path, any_re_search, ensure_bytes, ensure_unicode, get_tempfile_kwargs, on_windows, rmtemp, rmtree, unlink
label_desc: Use image node_id 3 for calling the ExtractedArchive obj's underlying member method code with example usage: obj.clean(force) without return types