class_docstr: A time series differencer.
  
  References
  ----------
  [^1]: [Stationarity and differencing](https://otexts.com/fpp2/stationarity.html)
  [^2]: [Backshift notation](https://otexts.com/fpp2/backshift.html)
class_docstr_tok: ["A","time","series","differencer",".","References","--","--","--","--","--","[","^1","]",":","[","Stationarity","and","differencing","]","(","https",":","\/\/otexts.com\/fpp2\/stationarity.html",")","[","^2","]",":","[","Backshift","notation","]","(","https",":","\/\/otexts.com\/fpp2\/backshift.html",")"]
docstr: Compose two differencers together.
docstr_tok: ["Compose","two","differencers","together","."]
code: def __mul__(self, other):
      """Compose two differencers together."""
      coeffs = collections.defaultdict(int)
  
      for (t1, c1), (t2, c2) in itertools.product(
          self.coeffs.items(), other.coeffs.items()
      ):
          coeffs[t1 + t2] += c1 * c2
  
      # Remove 0 coefficients
      for t, c in list(coeffs.items()):
          if c == 0:
              del coeffs[t]
  
      return Differencer.from_coeffs(dict(coeffs))
  
file_path: river/river/time_series/snarimax.py
imports: from __future__ import annotations
  import collections
  import itertools
  import math
  from river import base, linear_model, preprocessing, time_series
label_desc: Use image node_id 4 for calling the Differencer obj's underlying member method code with example usage: obj.__mul__(other) and returns: Differencer