code: def expected_ewma(self, data_df, window):
      # Comment copied from `test_engine.py`:
      # XXX: This is a comically inefficient way to compute a windowed EWMA.
      # Don't use it outside of testing.  We're using rolling-apply of an
      # ewma (which is itself a rolling-window function) because we only want
      # to look at ``window_length`` rows at a time.
      return data_df.rolling(window).apply(
          lambda sub: pd.DataFrame(sub)
          .ewm(span=window)
          .mean()
          .values[-1]
      )
  
imports: from __future__ import division
  from nose_parameterized import parameterized
  from six.moves import range
  import numpy
  import pandas
  import talib
  from numpy.random import RandomState
  from zipline.lib.adjusted_array import AdjustedArray
  from zipline.pipeline.data import USEquityPricing
  from zipline.pipeline.factors import BollingerBands, Aroon, FastStochasticOscillator, IchimokuKinkoHyo, LinearWeightedMovingAverage, RateOfChangePercentage, TrueRange, MovingAverageConvergenceDivergenceSignal, AnnualizedVolatility, RSI
  from zipline.testing import check_allclose, parameter_space
  from zipline.testing.fixtures import ZiplineTestCase
  from zipline.testing.predicates import assert_equal
  from .base import BaseUSEquityPipelineTestCase
label_desc: Use image node_id 1 for calling the MovingAverageConvergenceDivergenceTestCase obj's underlying member method code with example usage: obj.expected_ewma(data_df, window) and returns: data_df