code: def _timer(name, _logger=None, level="info"):
      """
      Output execution time of a function to the given logger level
  
      Parameters
      ----------
      name : str
          How to name the timer (will be in the logs)
      logger : logging.logger
          The optional logger where to write
      level : str
          On which level to log the performance measurement
      """
      start = tic()
      _logger = _logger or logger
      _logger.info("Starting %s", name)
      yield
      stop = tic()
      delta = datetime.timedelta(seconds=stop - start)
      _logger_level = getattr(_logger, level)
      _logger_level("Finished %s in %s", name, delta)
  
imports: import contextlib
  import datetime
  import functools
  import logging
  import warnings
  from collections.abc import Sequence
  from multiprocessing import cpu_count
  from numbers import Integral
  from timeit import default_timer
  import dask
  import dask.array
  import dask.dataframe
  import numpy
  import pandas
  import sklearn.utils.extmath
  import sklearn.utils.validation
  from dask import delayed
  from dask.array.utils import assert_eq
  from dask.dataframe.utils import assert_eq
  from ._utils import ConstantFunction
label_desc: Use image node_id 18 for calling a global function with example usage: _timer(name, _logger, level) without return types