def _get_frame(self, key):
        if isinstance(self.hmap, DynamicMap) and self.overlaid and self.current_frame:
            self.current_key = key
            return self.current_frame
        elif self.dynamic:
            key, frame = util.get_dynamic_item(self.hmap, self.dimensions, key)
            if not isinstance(key, tuple): key = (key,)
            if not key in self.keys:
                self.keys.append(key)
            self.current_frame = frame
            self.current_key = key
            return frame

        if isinstance(key, int):
            key = self.hmap.keys()[min([key, len(self.hmap)-1])]

        if key == self.current_key:
            return self.current_frame
        else:
            self.current_key = key

        if self.uniform:
            if not isinstance(key, tuple): key = (key,)
            kdims = [d.name for d in self.hmap.kdims]
            if self.dimensions is None:
                dimensions = kdims
            else:
                dimensions = [d.name for d in self.dimensions]
            if kdims == ['Frame'] and kdims != dimensions:
                select = dict(Frame=0)
            else:
                select = {d: key[dimensions.index(d)]
                          for d in kdims}
        else:
            select = dict(zip(self.hmap.dimensions('key', label=True), key))
        try:
            selection = self.hmap.select((HoloMap, DynamicMap), **select)
        except KeyError:
            selection = None
        selection = selection.last if isinstance(selection, HoloMap) else selection
        self.current_frame = selection

        return selection
dataset/ETHPy150Open ioam/holoviews/holoviews/plotting/plot.py/GenericElementPlot._get_frame/original