def __getitem__(self, key):
        """
        Return an element for any key chosen key (in'bounded mode') or
        for a previously generated key that is still in the cache
        (for one of the 'open' modes)
        """
        tuple_key = util.wrap_tuple(key)

        # Validation for bounded mode
        if self.mode == 'bounded':
            # DynamicMap(...)[:] returns a new DynamicMap with the same cache
            if key == slice(None, None, None):
                return self.clone(self)

            slices = [el for el in tuple_key if isinstance(el, slice)]
            if any(el.step for el in slices):
                raise Exception("Slices cannot have a step argument "
                                "in DynamicMap bounded mode ")
            if len(slices) not in [0, len(tuple_key)]:
                raise Exception("Slices must be used exclusively or not at all")
            if slices:
                return  self._slice_bounded(tuple_key)

        # Cache lookup
        try:
            cache = super(DynamicMap,self).__getitem__(key)
            # Return selected cache items in a new DynamicMap
            if isinstance(cache, DynamicMap) and self.mode=='open':
                cache = self.clone(cache)
        except __HOLE__ as e:
            cache = None
            if self.mode == 'open' and len(self.data)>0:
                raise KeyError(str(e) + " Note: Cannot index outside "
                               "available cache in open interval mode.")

        # If the key expresses a cross product, compute the elements and return
        product = self._cross_product(tuple_key, cache.data if cache else {})
        if product is not None:
            return product

        # Not a cross product and nothing cached so compute element.
        if cache: return cache
        val = self._execute_callback(*tuple_key)
        if self.call_mode == 'counter':
            val = val[1]

        self._cache(tuple_key, val)
        return val
dataset/ETHPy150Open ioam/holoviews/holoviews/core/spaces.py/DynamicMap.__getitem__