"""
Timer context manager, only used in debug.

"""

from time import time

import contextlib
from typing import Iterator


@contextlib.contextmanager
def timer(subject: str = "time") -> Iterator[None]:
    """print the elapsed time. (only used in debugging)"""
    start = time()
    yield
    elapsed = time() - start
    elapsed_ms = elapsed * 1000
    print(f"{subject} elapsed {elapsed_ms:.1f}ms")

@@ -106,18 +106,19 @@
  import 
-It
+Gen
 erator%0A%0A
@@ -185,17 +185,30 @@
  -%3E 
-It
+Gen
 erator%5B
+None, None, 
 None

update timer to generator