code: def ewm(
      s: "Stream[float]",
      com: float = None,
      span: float = None,
      halflife: float = None,
      alpha: float = None,
      min_periods: int = 0,
      adjust: bool = True,
      ignore_na: bool = False,
  ) -> "Stream[Tuple[List[float], List[float]]]":
      r"""Computes the weights and values in order to perform an exponential
      weighted moving operation.
  
      Parameters
      ----------
      s : `Stream[float]`
          A float stream.
      com : float, optional
          Specify decay in terms of center of mass,
          :math:`\alpha = 1 / (1 + com)`, for :math:`com \geq 0`.
      span : float, optional
          Specify decay in terms of span,
          :math:`\alpha = 2 / (span + 1)`, for :math:`span \geq 1`.
      halflife : float, optional
          Specify decay in terms of half-life,
          :math:`\alpha = 1 - \exp\left(-\ln(2) / halflife\right)`, for
          :math:`halflife > 0`.
      alpha : float, optional
          Specify smoothing factor :math:`\alpha` directly,
          :math:`0 < \alpha \leq 1`.
      min_periods : int, default 0
          Minimum number of observations in window required to have a value
          (otherwise result is NA).
      adjust : bool, default True
          Divide by decaying adjustment factor in beginning periods to account
          for imbalance in relative weightings (viewing EWMA as a moving average).
      ignore_na : bool, default False
          Ignore missing values when calculating weights.
  
      Returns
      -------
      `Stream[Tuple[List[float], List[float]]]`
          A stream of weights and values to be used for computation of exponential
          weighted moving operations.
      """
      return EWM(
          com=com,
          span=span,
          halflife=halflife,
          alpha=alpha,
          min_periods=min_periods,
          adjust=adjust,
          ignore_na=ignore_na,
      )(s)
  
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 1 for calling a global function with example usage: ewm(s, com, span, halflife, alpha, min_periods, adjust, ignore_na) and returns: EWM