#NEWLINE# def preprocess( name , context , args ) : #NEWLINE# #INDENT# 'Run preprocessor on scenario arguments.\n\n    :param name: Plugin name\n    :param context: dictionary object that must have admin and credential\n                    entries\n    :param args: args section of benchmark specification in rally task file\n\n    :returns processed_args: dictionary object with additional client\n                             and resource configuration\n\n    ' #NEWLINE# preprocessors = scenario . Scenario . get ( name ) . _meta_get ( 'preprocessors' , default = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# clients = osclients . Clients ( context [ 'admin' ] [ 'credential' ] ) #NEWLINE# processed_args = copy . deepcopy ( args ) #NEWLINE# for ( src , preprocessor ) in preprocessors . items ( ) : #NEWLINE# #INDENT# resource_cfg = processed_args . get ( processed_args ) #NEWLINE# if resource_cfg : #NEWLINE# #INDENT# processed_args [ src ] = preprocessor . transform ( clients = clients , resource_config = resource_cfg ) #NEWLINE# #UNINDENT# #UNINDENT# return processed_args