def create_options(options, passthru_args=None):
  class FakeOptions(object):
    def for_scope(self, scope):
      scoped_options = options[scope]
      # TODO(John Sirois): Some users pass in A dict of scope -> _FakeOptionValues instead of a
      # dict of scope -> (dict of option name -> value).  Clean up these usages and kill this
      # accomodation.
      if isinstance(scoped_options, _FakeOptionValues):
        return scoped_options
      else:
        return create_option_values(scoped_options)

    def for_global_scope(self):
      return self.for_scope('')

    def passthru_args_for_scope(self, scope):
      return passthru_args or []

    def items(self):
      return options.items()

    @property
    def scope_to_flags(self):
      return {}

    def get_fingerprintable_for_scope(self, scope):
      return []

    def __getitem__(self, key):
      return self.for_scope(key)
  return FakeOptions()
Based on the request's HTTP method, get the callback on this class that
dataset/ETHPy150Open pantsbuild/pants/tests/python/pants_test/option/util/fakes.py/create_options--crossover with--dataset/ETHPy150Open ofri/Open-Knesset/hashnav/base.py/View.get_callback