def fetch(self, act_on, on_nofilters_showall=False):
        if act_on not in ['indices', 'snapshots']:
            raise ValueError('invalid argument: %s', act_on)

        if act_on == 'indices':
            return self.indices(on_nofilters_showall=on_nofilters_showall)  # noqa
        else:
            return self.snapshots(on_nofilters_showall=on_nofilters_showall)  # noqa
dataset/ETHPy150Open StackStorm/st2contrib/packs/elasticsearch/actions/lib/items_selector.py/ItemsSelector.fetch/original