class_docstr: A stream operator that computes an exponential weighted moving average
  on a given float stream.
  
  Parameters
  ----------
  alpha : float
      The smoothing factor :math:`\alpha` directly,
      :math:`0 < \alpha \leq 1`.
  adjust : bool
      Divide by decaying adjustment factor in beginning periods to account
      for imbalance in relative weightings (viewing EWMA as a moving average).
  ignore_na : bool
      Ignore missing values when calculating weights.
  min_periods : int
      Minimum number of observations in window required to have a value
      (otherwise result is NA).
  bias : bool
      Use a standard estimation bias correction
class_docstr_tok: ["A","stream","operator","that","computes","an","exponential","weighted","moving","average","on","a","given","float","stream",".","Parameters","--","--","--","--","--","alpha",":","float","The","smoothing","factor",":","math",":","`","\\alpha","`","directly",",",":","math",":","`","0","<","\\alpha","\\leq","1","`",".","adjust",":","bool","Divide","by","decaying","adjustment","factor","in","beginning","periods","to","account","for","imbalance","in","relative","weightings","(","viewing","EWMA","as","a","moving","average",")",".","ignore_na",":","bool","Ignore","missing","values","when","calculating","weights",".","min_periods",":","int","Minimum","number","of","observations","in","window","required","to","have","a","value","(","otherwise","result","is","NA",")",".","bias",":","bool","Use","a","standard","estimation","bias","correction"]
code: def forward(self) -> float:
      v1 = self.inputs[0].value
      v2 = self.inputs[1].value
      if self.mean_x is None and self.mean_y is None:
          self.mean_x = v1
          self.mean_y = v2
          is_observation = (self.mean_x == self.mean_x) and (
              self.mean_y == self.mean_y
          )
          self.n += int(is_observation)
          if not is_observation:
              self.mean_x = np.nan
              self.mean_y = np.nan
          return (
              (0.0 if self.bias else np.nan)
              if self.n >= self.minp
              else np.nan
          )
  
      is_observation = (v1 == v1) and (v2 == v2)
      self.n += is_observation
  
      if self.mean_x == self.mean_x:
          if is_observation or not self.ignore_na:
              self.sum_wt *= self.factor
              self.sum_wt2 *= self.factor * self.factor
              self.old_wt *= self.factor
              if is_observation:
                  old_mean_x = self.mean_x
                  old_mean_y = self.mean_y
  
                  # avoid numerical errors on constant streams
                  wt_sum = self.old_wt + self.new_wt
  
                  if self.mean_x != v1:
                      self.mean_x = (
                          (self.old_wt * old_mean_x)
                          + (self.new_wt * v1)
                      ) / wt_sum
  
                  # avoid numerical errors on constant series
                  if self.mean_y != v2:
                      self.mean_y = (
                          (self.old_wt * old_mean_y)
                          + (self.new_wt * v2)
                      ) / wt_sum
  
                  d1 = old_mean_x - self.mean_x
                  d2 = old_mean_y - self.mean_y
  
                  d3 = v1 - self.mean_x
                  d4 = v2 - self.mean_y
  
                  t1 = self.old_wt * (self.cov + d1 * d2)
                  t2 = self.new_wt * d3 * d4
                  self.cov = (t1 + t2) / wt_sum
  
                  self.sum_wt += self.new_wt
                  self.sum_wt2 += self.new_wt * self.new_wt
                  self.old_wt += self.new_wt
                  if not self.adjust:
                      self.sum_wt /= self.old_wt
                      self.sum_wt2 /= self.old_wt * self.old_wt
                      self.old_wt = 1
  
      elif is_observation:
          self.mean_x = v1
          self.mean_y = v2
  
      if self.n >= self.minp:
          if not self.bias:
              numerator = self.sum_wt * self.sum_wt
              denominator = numerator - self.sum_wt2
              if denominator > 0:
                  output = (numerator / denominator) * self.cov
              else:
                  output = np.nan
          else:
              output = self.cov
      else:
          output = np.nan
  
      return output
  
imports: from typing import List, Tuple
  import numpy
  from tensortrade.feed.core.base import Stream
  from tensortrade.feed.api.float import Float
label_desc: Use image node_id 2 for calling the ExponentialWeightedMovingCovariance obj's underlying member method code with example usage: obj.forward() and returns: output, unknown