class_docstr: Base class for slippage models which compute a simulated price impact
  according to a history lookback.
docstr: Internal utility method to return the trailing mean volume over the
  past 'window_length' days, and volatility of close prices for a
  specific asset.
  
  Parameters
  ----------
  data : The BarData from which to fetch the daily windows.
  asset : The Asset whose data we are fetching.
  window_length : Number of days of history used to calculate the mean
      volume and close price volatility.
  
  Returns
  -------
  (mean volume, volatility)
docstr_tok: ["Internal","utility","method","to","return","the","trailing","mean","volume","over","the","past","'window_length","'","days",",","and","volatility","of","close","prices","for","a","specific","asset",".","Parameters","--","--","--","--","--","data",":","The","BarData","from","which","to","fetch","the","daily","windows",".","asset",":","The","Asset","whose","data","we","are","fetching",".","window_length",":","Number","of","days","of","history","used","to","calculate","the","mean","volume","and","close","price","volatility",".","Returns","--","--","--","-","(","mean","volume",",","volatility",")"]
code: def _get_window_data(self, data, asset, window_length):
      """
      Internal utility method to return the trailing mean volume over the
      past 'window_length' days, and volatility of close prices for a
      specific asset.
  
      Parameters
      ----------
      data : The BarData from which to fetch the daily windows.
      asset : The Asset whose data we are fetching.
      window_length : Number of days of history used to calculate the mean
          volume and close price volatility.
  
      Returns
      -------
      (mean volume, volatility)
      """
      try:
          values = self._window_data_cache.get(
              asset, data.current_session
          )
      except KeyError:
          try:
              # Add a day because we want 'window_length' complete days,
              # excluding the current day.
              volume_history = data.history(
                  asset,
                  "volume",
                  window_length + 1,
                  "1d",
              )
              close_history = data.history(
                  asset,
                  "close",
                  window_length + 1,
                  "1d",
              )
          except HistoryWindowStartsBeforeData:
              # If there is not enough data to do a full history call, return
              # values as if there was no data.
              return 0, np.NaN
  
          # Exclude the first value of the percent change array because it is
          # always just NaN.
          close_volatility = (
              close_history[:-1]
              .pct_change()[1:]
              .std(
                  skipna=False,
              )
          )
          values = {
              "volume": volume_history[:-1].mean(),
              "close": close_volatility * SQRT_252,
          }
          self._window_data_cache.set(
              asset, values, data.current_session
          )
  
      return values["volume"], values["close"]
  
imports: from __future__ import division
  from abc import abstractmethod
  import math
  import numpy
  from pandas import isnull
  from six import with_metaclass
  from toolz import merge
  from zipline.assets import Equity, Future
  from zipline.errors import HistoryWindowStartsBeforeData
  from zipline.finance.constants import ROOT_SYMBOL_TO_ETA
  from zipline.finance.shared import AllowedAssetMarker, FinancialModelMeta
  from zipline.finance.transaction import create_transaction
  from zipline.utils.cache import ExpiringCache
  from zipline.utils.dummy import DummyMapping
  from zipline.utils.input_validation import expect_bounded, expect_strictly_bounded
label_desc: Use image node_id 5 for calling the MarketImpactBase obj's underlying member method code with example usage: obj._get_window_data(data, asset, window_length) and returns: values,  values, int,  np