code: def test_monotonic():
      t = metrics._WindowsTime(
          time.monotonic, is_monotonic=True, resync_every=0.1
      ).time
      prev = float("-inf")
      t_end = time.perf_counter() + 3
      while time.perf_counter() < t_end:
          sample = t()
          assert sample > prev
          prev = sample
  
imports: from __future__ import annotations
  import math
  import pickle
  import threading
  import time
  import pytest
  from distributed import metrics
  from distributed.compatibility import WINDOWS
  from distributed.utils import offload
  from distributed.utils_test import gen_test
label_desc: Use image node_id 2 for calling a global function with example usage: test_monotonic() without return types