<s> from nameko . constants import ( <EOL> LANGUAGE_CONTEXT_KEY , USER_ID_CONTEXT_KEY , USER_AGENT_CONTEXT_KEY , <EOL> AUTH_TOKEN_CONTEXT_KEY , <EOL> ) <EOL> from nameko . extensions import DependencyProvider <EOL> class ContextDataProvider ( DependencyProvider ) : <EOL> context_key = None <EOL> def get_dependency ( self , worker_ctx ) : <EOL> return worker_ctx . data . get ( self . context_key ) <EOL> class Language ( ContextDataProvider ) : <EOL> context_key = LANGUAGE_CONTEXT_KEY <EOL> class UserId ( ContextDataProvider ) : <EOL> context_key = USER_ID_CONTEXT_KEY <EOL> class UserAgent ( ContextDataProvider ) : <EOL> context_key = USER_AGENT_CONTEXT_KEY <EOL> class AuthToken ( ContextDataProvider ) : <EOL> context_key = AUTH_TOKEN_CONTEXT_KEY </s>
