class_docstr: Setup a sample hierarchy of datasets to be used
class_docstr_tok: ["Setup","a","sample","hierarchy","of","datasets","to","be","used"]
code: def setup(self):
      self.log(
          "Setup ran in %s, existing paths: %s", getpwd(), glob("*")
      )
  
      tempdir = tempfile.mkdtemp(**get_tempfile_kwargs({}, prefix="bm"))
      self.remove_paths.append(tempdir)
      with tarfile.open(self.tarfile) as tar:
          # note: not a concern for CVE-2007-4559 since we are the ones mastering
          # content for the tar here. See https://github.com/datalad/datalad/pull/7104
          # for more information.
          tar.extractall(tempdir)
  
      # TODO -- remove this abomination after https://github.com/datalad/datalad/issues/1512 is fixed
      epath = op.join(tempdir, "testds1")
      epath_unique = epath + str(self.__class__.ds_count)
      os.rename(epath, epath_unique)
      self.__class__.ds_count += 1
      self.ds = Dataset(epath_unique)
      self.repo = self.ds.repo
      self.log("Finished setup for %s", tempdir)
  
imports: import os
  import sys
  import tarfile
  import tempfile
  import timeit
  import os.path
  from glob import glob
  from datalad.utils import getpwd, get_tempfile_kwargs, rmtree
  from datalad.api import Dataset, create_test_dataset
label_desc: Use image node_id 2 for calling the SampleSuperDatasetBenchmarks obj's underlying member method code with example usage: obj.setup() without return types