def __getitem__(self, key):
    task_cls = analysis_task_registry[key]

    @wraps(task_cls.__init__)
    def func(*args, **kwargs):
        task = task_cls(*args, **kwargs)
        return self.time_series.eval(task)
    return func
def __getitem__(self, key):
    task_cls = analysis_task_registry[key]

    @wraps(task_cls.__init__)
    def func(*args, **kwargs):
        task = task_cls(*args, **kwargs)
        return self.time_series.eval(task)
    return func