code: def plot_slippage_sweep(
      returns,
      positions,
      transactions,
      slippage_params=(3, 8, 10, 12, 15, 20, 50),
      ax=None,
      **kwargs,
  ):
      """
      Plots equity curves at different per-dollar slippage assumptions.
  
      Parameters
      ----------
      returns : pd.Series
          Timeseries of portfolio returns to be adjusted for various
          degrees of slippage.
      positions : pd.DataFrame
          Daily net position values.
           - See full explanation in tears.create_full_tear_sheet.
      transactions : pd.DataFrame
          Prices and amounts of executed trades. One row per trade.
           - See full explanation in tears.create_full_tear_sheet.
      slippage_params: tuple
          Slippage pameters to apply to the return time series (in
          basis points).
      ax : matplotlib.Axes, optional
          Axes upon which to plot.
      **kwargs, optional
          Passed to seaborn plotting function.
  
      Returns
      -------
      ax : matplotlib.Axes
          The axes that were plotted on.
      """
  
      if ax is None:
          ax = plt.gca()
  
      slippage_sweep = pd.DataFrame()
      for bps in slippage_params:
          adj_returns = txn.adjust_returns_for_slippage(
              returns, positions, transactions, bps
          )
          label = str(bps) + " bps"
          slippage_sweep[label] = ep.cum_returns(adj_returns, 1)
  
      slippage_sweep.plot(alpha=1.0, lw=0.5, ax=ax)
  
      ax.set_title(
          "Cumulative returns given additional per-dollar slippage"
      )
      ax.set_ylabel("")
  
      ax.legend(loc="center left", frameon=True, framealpha=0.5)
  
      return ax
  
imports: from __future__ import division
  import datetime
  from collections import OrderedDict
  from functools import wraps
  import empyrical
  import matplotlib
  import matplotlib.patches
  import matplotlib.pyplot
  import numpy
  import pandas
  import pytz
  import scipy
  from matplotlib import figure
  from matplotlib.backends.backend_agg import FigureCanvasAgg
  from matplotlib.ticker import FuncFormatter
  from .None import _seaborn
  from .None import capacity
  from .None import pos
  from .None import timeseries
  from .None import txn
  from .None import utils
  from .utils import APPROX_BDAYS_PER_MONTH, MM_DISPLAY_UNIT
label_desc: Use image node_id 25 for calling a global function with example usage: plot_slippage_sweep(returns, positions, transactions, slippage_params, ax) and returns: ax