docstr: Yield (timestamp, number of threads across the cluster), forward-fill
docstr_tok: ["Yield","(","timestamp",",","number","of","threads","across","the","cluster",")",",","forward-fill"]
code: def _nthreads_timeseries(self) -> Iterator[tuple[float, int]]:
      """Yield (timestamp, number of threads across the cluster), forward-fill"""
      stop = self.stop if self.done else 0
      for t, n in islice(
          self._total_nthreads_history,
          self._total_nthreads_offset,
          None,
      ):
          if stop and t >= stop:
              break
          yield max(self.enqueued, t), n
  
imports: from __future__ import annotations
  import uuid
  import weakref
  from collections import defaultdict
  from collections.abc import Hashable, Iterable, Iterator
  from contextlib import contextmanager
  from itertools import islice
  from typing import TYPE_CHECKING, Any
  import dask.config
  from dask.typing import Key
  from distributed.collections import sum_mappings
  from distributed.itertools import ffill
  from distributed.metrics import time
label_desc: Use image node_id 17 for calling the Span obj's underlying member method code with example usage: obj._nthreads_timeseries() without return types