docstr: If this span is the output of :meth:`merge`, yield
  (timestamp, True if at least one input span is active), forward-fill.
docstr_tok: ["If","this","span","is","the","output","of",":","meth",":","`","merge","`",",","yield","(","timestamp",",","True","if","at","least","one","input","span","is","active",")",",","forward-fill","."]
code: def _active_timeseries(self) -> Iterator[tuple[float, bool]]:
      """If this span is the output of :meth:`merge`, yield
      (timestamp, True if at least one input span is active), forward-fill.
      """
      if self.id != "(merged)":
          yield self.enqueued, True
          yield self.stop, False
          return
  
      events = []
      for child in self.children:
          events += [(child.enqueued, 1), (child.stop, -1)]
      # enqueued <= stop by construction.
      # Occasionally, enqueued == stop, e.g. when the clock is adjusted backwards.
      # Prevent negative n_active when this happens.
      events.sort(key=lambda el: el[0])
  
      n_active = 0
      for t, delta in events:
          if not n_active:
              assert delta == 1
              yield t, True
          n_active += delta
          if not n_active:
              yield t, False
  
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 18 for calling the Span obj's underlying member method code with example usage: obj._active_timeseries() without return types