docstr: Measure elapsed  time of a given block
docstr_tok: ["Measure","elapsed","time","of","a","given","block"]
code: def time(self, name):
      """Measure elapsed  time of a given block"""
      start = time.time()
      yield
      total = time.time() - start
  
      value = getattr(self, name)
      setattr(self, name, value + total)
  
imports: from __future__ import annotations
  import logging
  import os
  import shutil
  import signal
  import time
  import typing
  import warnings
  from contextlib import contextmanager
  from dataclasses import dataclass
  from typing import Callable
  import orion.core
  from orion.core.utils import backward
  from orion.core.utils.exceptions import BrokenExperiment, CompletedExperiment, InvalidResult, LazyWorkers, ReservationRaceCondition, WaitingForTrials
  from orion.core.utils.flatten import flatten, unflatten
  from orion.core.worker.consumer import ExecutionError
  from orion.core.worker.trial import AlreadyReleased
  from orion.executor.base import AsyncException, AsyncResult
  from orion.storage.base import LockAcquisitionTimeout
label_desc: Use image node_id 1 for calling the _Stat obj's underlying member method code with example usage: obj.time(name) without return types