#NEWLINE# @ contextmanager #NEWLINE# def temp_pipeline_engine( calendar , sids , random_seed , symbols = None ) : #NEWLINE# #INDENT# '\n    A contextManager that yields a SimplePipelineEngine holding a reference to\n    an AssetFinder generated via tmp_asset_finder.\n\n    Parameters\n    ----------\n    calendar : pd.DatetimeIndex\n        Calendar to pass to the constructed PipelineEngine.\n    sids : iterable[int]\n        Sids to use for the temp asset finder.\n    random_seed : int\n        Integer used to seed instances of SeededRandomLoader.\n    symbols : iterable[str], optional\n        Symbols for constructed assets. Forwarded to make_simple_equity_info.\n    ' #NEWLINE# equity_info = make_simple_equity_info ( sids = sids , start_date = calendar [ 0 ] , end_date = calendar [ ( - 1 ) ] , symbols = symbols ) #NEWLINE# loader = make_seeded_random_loader ( random_seed , calendar , sids ) #NEWLINE# get_loader = ( lambda column : loader ) #NEWLINE# with tmp_asset_finder ( equities = equity_info ) as finder : #NEWLINE# #INDENT# ( yield SimplePipelineEngine ( get_loader , calendar , finder ) )