code: def roll_up_capture(returns, factor_returns, window=10, **kwargs):
      """
      Computes the up capture measure over a rolling window.
      see documentation for :func:`~empyrical.stats.up_capture`.
      (pass all args, kwargs required)
  
      Parameters
      ----------
      returns : pd.Series or np.ndarray
          Daily returns of the strategy, noncumulative.
          - See full explanation in :func:`~empyrical.stats.cum_returns`.
  
      factor_returns : pd.Series or np.ndarray
          Noncumulative returns of the factor to which beta is
          computed. Usually a benchmark such as the market.
          - This is in the same style as returns.
  
      window : int, required
          Size of the rolling window in terms of the periodicity of the data.
          - eg window = 60, periodicity=DAILY, represents a rolling 60 day window
      """
      return roll(
          returns,
          factor_returns,
          window=window,
          function=up_capture,
          **kwargs,
      )
  
imports: from __future__ import division
  import math
  import pandas
  import numpy
  from math import pow
  from scipy import stats, optimize
  from six import iteritems
  from sys import float_info
  from .utils import nanmean, nanstd, nanmin, up, down, roll, rolling_window
  from .periods import ANNUALIZATION_FACTORS, APPROX_BDAYS_PER_YEAR
  from .periods import DAILY, WEEKLY, MONTHLY, QUARTERLY, YEARLY
label_desc: Use image node_id 50 for calling a global function with example usage: roll_up_capture(returns, factor_returns, window) and returns: roll