docstr: Return number of CPU seconds that were made available on the cluster while
  this Span was running; in other words
  ``(Span.stop - Span.enqueued) * Scheduler.total_nthreads``.
  
  This accounts for workers joining and leaving the cluster while this Span was
  active. If this Span is the output of :meth:`merge`, do not count gaps between
  input spans.
  
  See Also
  --------
  enqueued
  stop
  nthreads_intervals
  distributed.scheduler.SchedulerState.total_nthreads
docstr_tok: ["Return","number","of","CPU","seconds","that","were","made","available","on","the","cluster","while","this","Span","was","running",";","in","other","words","``","(","Span.stop","-","Span.enqueued",")","*","Scheduler.total_nthreads","``",".","This","accounts","for","workers","joining","and","leaving","the","cluster","while","this","Span","was","active",".","If","this","Span","is","the","output","of",":","meth",":","`","merge","`",",","do","not","count","gaps","between","input","spans",".","See","Also","--","--","--","--","enqueued","stop","nthreads_intervals","distributed.scheduler.SchedulerState.total_nthreads"]
code: def active_cpu_seconds(self) -> float:
      """Return number of CPU seconds that were made available on the cluster while
      this Span was running; in other words
      ``(Span.stop - Span.enqueued) * Scheduler.total_nthreads``.
  
      This accounts for workers joining and leaving the cluster while this Span was
      active. If this Span is the output of :meth:`merge`, do not count gaps between
      input spans.
  
      See Also
      --------
      enqueued
      stop
      nthreads_intervals
      distributed.scheduler.SchedulerState.total_nthreads
      """
      return sum(
          (t1 - t0) * nthreads
          for t0, t1, nthreads in self.nthreads_intervals
      )
  
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 20 for calling the Span obj's underlying member method code with example usage: obj.active_cpu_seconds() and returns: sum