<s> """<STR_LIT>""" <EOL> import os <EOL> import sys <EOL> import traceback <EOL> from . jobmanager import JobManager_Client <EOL> from . import ode_wrapper <EOL> def merge_arg_and_const_arg ( arg , const_arg ) : <EOL> """<STR_LIT>""" <EOL> if hasattr ( arg , '<STR_LIT>' ) : <EOL> arg = arg . _asdict ( ) <EOL> if hasattr ( const_arg , '<STR_LIT>' ) : <EOL> const_arg = const_arg . _asdict ( ) <EOL> args_dgl = tuple ( ) <EOL> if '<STR_LIT:args>' in arg : <EOL> args_dgl += arg [ '<STR_LIT:args>' ] <EOL> if '<STR_LIT:args>' in const_arg : <EOL> args_dgl += const_arg [ '<STR_LIT:args>' ] <EOL> kwargs = { } <EOL> kwargs . update ( const_arg ) <EOL> kwargs . update ( arg ) <EOL> if '<STR_LIT:args>' in kwargs : <EOL> del kwargs [ '<STR_LIT:args>' ] <EOL> if '<STR_LIT:id>' in kwargs : <EOL> del kwargs [ '<STR_LIT:id>' ] <EOL> return args_dgl , kwargs <EOL> class Integration_Client_CPLX ( JobManager_Client ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , ** kwargs ) : <EOL> super ( Integration_Client_CPLX , self ) . __init__ ( ** kwargs ) <EOL> @ staticmethod <EOL> def func ( arg , const_arg , c , m ) : <EOL> args_dgl , kwargs = merge_arg_and_const_arg ( arg , const_arg ) <EOL> m . value = kwargs [ '<STR_LIT:N>' ] <EOL> return ode_wrapper . integrate_cplx ( c = c , args = args_dgl , ** kwargs ) <EOL> class Integration_Client_REAL ( JobManager_Client ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , ** kwargs ) : <EOL> super ( Integration_Client_REAL , self ) . __init__ ( ** kwargs ) <EOL> @ staticmethod <EOL> def func ( arg , const_arg , c , m ) : <EOL> args_dgl , kwargs = merge_arg_and_const_arg ( arg , const_arg ) <EOL> m . value = kwargs [ '<STR_LIT:N>' ] <EOL> return ode_wrapper . integrate_real ( c = c , args = args_dgl , ** kwargs ) <EOL> class FunctionCall_Client ( JobManager_Client ) : <EOL> @ staticmethod <EOL> def func ( arg , const_arg , c , m ) : <EOL> if hasattr ( arg , '<STR_LIT>' ) : <EOL> arg = arg . _asdict ( ) <EOL> if hasattr ( const_arg , '<STR_LIT>' ) : <EOL> const_arg = const_arg . _asdict ( ) <EOL> f = const_arg [ '<STR_LIT:f>' ] <EOL> f_kwargs = { } <EOL> f_kwargs . update ( arg ) <EOL> f_kwargs . update ( const_arg ) <EOL> f_kwargs . pop ( '<STR_LIT:f>' ) <EOL> f_kwargs [ '<STR_LIT>' ] = c <EOL> f_kwargs [ '<STR_LIT>' ] = m <EOL> return f ( ** f_kwargs ) </s>
