def sample(self, samples=[]):
        sample_data = []
        offset = 0
        for i, sample in enumerate(samples):
            sample = (sample,) if np.isscalar(sample) else sample
            value = self[(slice(None),)+sample]
            if isinstance(value, NdElement):
                for idx, (k, v) in enumerate(value.data.items()):
                    sample_data.append(((i+offset+idx,)+k, v))
                offset += idx
            else:
                sample_data.append(((i+offset,)+sample, (value,)))
        return self.clone(sample_data)
Destroys all the non-mirror databases.
dataset/ETHPy150Open ioam/holoviews/holoviews/core/element.py/NdElement.sample--crossover with--dataset/ETHPy150Open golismero/golismero/thirdparty_libs/django/test/simple.py/DjangoTestSuiteRunner.teardown_databases