code: def timeit(n_reps=10):
      def timer(func):
          def timed_func(*args, **kwargs):
              start = time()
              for _ in range(n_reps):
                  result = func(*args, **kwargs)
              end = time()
              print(
                  "%s has been executed in %f s avg for %d reps"
                  % (func.__name__, (end - start) / n_reps, n_reps)
              )
              runtime[func.__name__] = (end - start) / n_reps
              return result
  
          return timed_func
  
      return timer
  
imports: from time import time
  import numpy
  from acton.acton import main
  from alp.active_learning.active_learning import ActiveLearner
  from libact.base.dataset import Dataset
  from libact.labelers import IdealLabeler
  from libact.models.logistic_regression import LogisticRegression
  from libact.query_strategies import QueryByCommittee, UncertaintySampling
  from libact.query_strategies.multiclass.expected_error_reduction import EER
  from modAL.expected_error import expected_error_reduction
  from modAL.models import ActiveLearner, Committee
  from sklearn.datasets import load_iris
  from sklearn.linear_model import LogisticRegression
label_desc: Use image node_id 1 for calling a global function with example usage: timeit(n_reps) and returns: timer, timed_func, result