def pb_to_query_result(self, pb, query_options):
    if query_options.keys_only:
      return self.pb_to_key(pb.key())
    else:
      return self.pb_to_entity(pb)
Ensure that expired options raise CodeRemovedError on attempted use.
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/datastore/datastore_rpc.py/AbstractAdapter.pb_to_query_result--crossover with--dataset/ETHPy150Open pantsbuild/pants/tests/python/pants_test/option/test_options.py/OptionsTest.test_deprecated_option_past_removal