class_docstr: A generic wrapper for performing time rolling computations.
  
  This can be wrapped around any object which implements both an `update` and a `revert` method.
  Inputs to `update` are stored in a queue. Elements of the queue are popped when they are too
  old.
  
  Parameters
  ----------
  obj
      An object that implements both an `update` method and a `rolling `method.
  period
      A duration of time, expressed as a `datetime.timedelta`.
  
  Examples
  --------
  
  For instance, here is how you can compute a rolling average over a period of 3 days:
  
  >>> from river import stats, utils
  
  >>> X = {
  ...     dt.datetime(2019, 1, 1): 1,
  ...     dt.datetime(2019, 1, 2): 5,
  ...     dt.datetime(2019, 1, 3): 9,
  ...     dt.datetime(2019, 1, 4): 13
  ... }
  
  >>> rmean = utils.TimeRolling(stats.Mean(), period=dt.timedelta(days=3))
  >>> for t, x in X.items():
  ...     rmean.update(x, t=t)
  ...     print(rmean.get())
  1.0
  3.0
  5.0
  9.0
code: def __init__(self, obj: Rollable, period: dt.timedelta):
      super().__init__(obj)
      self.period = period
      self._timestamps: list[dt.datetime] = []
      self._datum: list[typing.Any] = []
      self._latest = dt.datetime(1, 1, 1)
  
imports: from __future__ import annotations
  import bisect
  import collections
  import datetime
  import typing
label_desc: Use image node_id 1 to create a new TimeRolling object from inherited base classes: BaseRolling with example: obj = TimeRolling(obj, period)