def _make_ctx_options(ctx_options, config_cls=ContextOptions):
 if (not ctx_options):
  return None
 for key in list(ctx_options):
  translation = _OPTION_TRANSLATIONS.get(key)
  if translation:
   if (translation in ctx_options):
    raise ValueError(('Cannot specify %s and %s at the same time' % (key, translation)))
   ctx_options[translation] = ctx_options.pop(key)
 return config_cls(**ctx_options)

def _make_ctx_options ( ctx_options , config_cls = ContextOptions ) : if ( not ctx_options ) : return None for key in list ( ctx_options ) : translation = _OPTION_TRANSLATIONS . get ( key ) if translation : if ( translation in ctx_options ) : raise ValueError ( ( 'Cannot specify %s and %s at the same time' % ( key , translation ) ) ) ctx_options [ translation ] = ctx_options . pop ( key ) return config_cls ( ** ctx_options )
helper to construct a contextoptions object from keyword arguments .