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)
Calculate the index in args of the first URL arg.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/ndb/context.py/_make_ctx_options--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/command.py/Command._CalculateUrlsStartArg