# Path: google/cloud/ndb/_datastore_api.py
# EVENTUAL = datastore_pb2.ReadOptions.EVENTUAL
# EVENTUAL_CONSISTENCY = EVENTUAL  # Legacy NDB
# STRONG = datastore_pb2.ReadOptions.STRONG
# _DEFAULT_TIMEOUT = None
# _NOT_FOUND = object()
# def stub():
# def make_call(rpc_name, request, retries=None, timeout=None):
#     def rpc_call():
# def lookup(key, options):
#     def __init__(self, options):
#     def full(self):
#     def add(self, key):
#     def idle_callback(self):
#     def lookup_callback(self, rpc):
# def _datastore_lookup(keys, read_options, retries=None, timeout=None):
# def get_read_options(options, default_read_consistency=None):
# def put(entity, options):
#                 def callback():
# def delete(key, options):
#             def callback():
#     def __init__(self, options):
#     def full(self):
#     def put(self, entity_pb):
#     def delete(self, key):
#     def idle_callback(self):
#         def commit_callback(rpc):
# def prepare_to_commit(transaction):
# def commit(transaction, retries=None, timeout=None):
# def _get_commit_batch(transaction, options):
#     def __init__(self, transaction, options):
#     def put(self, entity_pb):
#     def delete(self, key):
#     def idle_callback(self):
#         def callback(rpc):
#     def allocate_ids_callback(self, rpc, mutations, futures):
#     def commit(self, retries=None, timeout=None):
#         def commit_callback(rpc):
# def _process_commit(rpc, futures):
# def _complete(key_pb):
# def _datastore_commit(mutations, transaction, retries=None, timeout=None):
# def allocate(keys, options):
#     def __init__(self, options):
#     def full(self):
#     def room_left(self):
#     def add(self, keys):
#     def idle_callback(self):
#     def allocate_ids_callback(self, rpc):
# def _datastore_allocate_ids(keys, retries=None, timeout=None):
# def begin_transaction(read_only, retries=None, timeout=None):
# def _datastore_begin_transaction(read_only, retries=None, timeout=None):
# def rollback(transaction, retries=None, timeout=None):
# def _datastore_rollback(transaction, retries=None, timeout=None):
# class _LookupBatch(object):
# class _NonTransactionalCommitBatch(object):
# class _TransactionalCommitBatch(_NonTransactionalCommitBatch):
# class _AllocateIdsBatch(object):
# 
# Path: google/cloud/ndb/_options.py
# class Options(object):
# class ReadOptions(Options):
#     def options_or_model_properties(cls, wrapped):
#     def options(cls, wrapped, _disambiguate_from_model_properties=False):
#         def wrapper(*args, **kwargs):
#                 def get_arg(kwargs, name):
#     def slots(cls):
#     def __init__(self, config=None, **kwargs):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __repr__(self):
#     def copy(self, **kwargs):
#     def items(self):
#     def __init__(self, config=None, **kwargs):
# 
# Path: google/cloud/ndb/utils.py
# TRUTHY_STRINGS = {"t", "true", "y", "yes", "on", "1"}
# DEBUG = asbool(os.environ.get("NDB_DEBUG", False))
# def asbool(value):
# def code_info(*args, **kwargs):
# def decorator(*args, **kwargs):
# def frame_info(*args, **kwargs):
# def func_info(*args, **kwargs):
# def gen_info(*args, **kwargs):
# def get_stack(*args, **kwargs):
# def logging_debug(log, message, *args, **kwargs):
#     def __init__(self, **kwargs):
#     def __call__(self, wrapped):
#         def wrapper(*args, **kwargs):
# def positional(max_pos_args):
#     def positional_decorator(wrapped):
#         def positional_wrapper(*args, **kwds):
# def tweak_logging(*args, **kwargs):
# def wrapping(*args, **kwargs):
# class keyword_only(object):


import pytest
from google.cloud.ndb import _datastore_api
from google.cloud.ndb import _options
from google.cloud.ndb import utils
        )

    @staticmethod
    def test_options_bad_signature():
        @utils.positional(2)
        def hi(foo, mom):
            pass

        with pytest.raises(TypeError):
            MyOptions.options(hi)

        hi("mom", "!")  # coverage

    @staticmethod
    def test_options_delegated():
        @MyOptions.options
        @utils.positional(4)
        def hi(mom, foo=None, retries=None, timeout=None, _options=None):
            return mom, _options

        options = MyOptions(foo="bar", retries=23, timeout=42)
        assert hi("mom", "baz", 24, timeout=43, _options=options) == (
            "mom",
            options,
        )


class TestReadOptions:
    @staticmethod
    def test_constructor_w_read_policy():

# Path: google/cloud/ndb/_datastore_api.py
# EVENTUAL = datastore_pb2.ReadOptions.EVENTUAL
# EVENTUAL_CONSISTENCY = EVENTUAL  # Legacy NDB
# STRONG = datastore_pb2.ReadOptions.STRONG
# _DEFAULT_TIMEOUT = None
# _NOT_FOUND = object()
# def stub():
# def make_call(rpc_name, request, retries=None, timeout=None):
#     def rpc_call():
# def lookup(key, options):
#     def __init__(self, options):
#     def full(self):
#     def add(self, key):
#     def idle_callback(self):
#     def lookup_callback(self, rpc):
# def _datastore_lookup(keys, read_options, retries=None, timeout=None):
# def get_read_options(options, default_read_consistency=None):
# def put(entity, options):
#                 def callback():
# def delete(key, options):
#             def callback():
#     def __init__(self, options):
#     def full(self):
#     def put(self, entity_pb):
#     def delete(self, key):
#     def idle_callback(self):
#         def commit_callback(rpc):
# def prepare_to_commit(transaction):
# def commit(transaction, retries=None, timeout=None):
# def _get_commit_batch(transaction, options):
#     def __init__(self, transaction, options):
#     def put(self, entity_pb):
#     def delete(self, key):
#     def idle_callback(self):
#         def callback(rpc):
#     def allocate_ids_callback(self, rpc, mutations, futures):
#     def commit(self, retries=None, timeout=None):
#         def commit_callback(rpc):
# def _process_commit(rpc, futures):
# def _complete(key_pb):
# def _datastore_commit(mutations, transaction, retries=None, timeout=None):
# def allocate(keys, options):
#     def __init__(self, options):
#     def full(self):
#     def room_left(self):
#     def add(self, keys):
#     def idle_callback(self):
#     def allocate_ids_callback(self, rpc):
# def _datastore_allocate_ids(keys, retries=None, timeout=None):
# def begin_transaction(read_only, retries=None, timeout=None):
# def _datastore_begin_transaction(read_only, retries=None, timeout=None):
# def rollback(transaction, retries=None, timeout=None):
# def _datastore_rollback(transaction, retries=None, timeout=None):
# class _LookupBatch(object):
# class _NonTransactionalCommitBatch(object):
# class _TransactionalCommitBatch(_NonTransactionalCommitBatch):
# class _AllocateIdsBatch(object):
# 
# Path: google/cloud/ndb/_options.py
# class Options(object):
# class ReadOptions(Options):
#     def options_or_model_properties(cls, wrapped):
#     def options(cls, wrapped, _disambiguate_from_model_properties=False):
#         def wrapper(*args, **kwargs):
#                 def get_arg(kwargs, name):
#     def slots(cls):
#     def __init__(self, config=None, **kwargs):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __repr__(self):
#     def copy(self, **kwargs):
#     def items(self):
#     def __init__(self, config=None, **kwargs):
# 
# Path: google/cloud/ndb/utils.py
# TRUTHY_STRINGS = {"t", "true", "y", "yes", "on", "1"}
# DEBUG = asbool(os.environ.get("NDB_DEBUG", False))
# def asbool(value):
# def code_info(*args, **kwargs):
# def decorator(*args, **kwargs):
# def frame_info(*args, **kwargs):
# def func_info(*args, **kwargs):
# def gen_info(*args, **kwargs):
# def get_stack(*args, **kwargs):
# def logging_debug(log, message, *args, **kwargs):
#     def __init__(self, **kwargs):
#     def __call__(self, wrapped):
#         def wrapper(*args, **kwargs):
# def positional(max_pos_args):
#     def positional_decorator(wrapped):
#         def positional_wrapper(*args, **kwds):
# def tweak_logging(*args, **kwargs):
# def wrapping(*args, **kwargs):
# class keyword_only(object):


# Path: tests/unit/test__options.py
import pytest
from google.cloud.ndb import _datastore_api
from google.cloud.ndb import _options
from google.cloud.ndb import utils

        )

    @staticmethod
    def test_options_bad_signature():
        @utils.positional(2)
        def hi(foo, mom):
            pass

        with pytest.raises(TypeError):
            MyOptions.options(hi)

        hi("mom", "!")  # coverage

    @staticmethod
    def test_options_delegated():
        @MyOptions.options
        @utils.positional(4)
        def hi(mom, foo=None, retries=None, timeout=None, _options=None):
            return mom, _options

        options = MyOptions(foo="bar", retries=23, timeout=42)
        assert hi("mom", "baz", 24, timeout=43, _options=options) == (
            "mom",
            options,
        )


class TestReadOptions:
    @staticmethod
    def test_constructor_w_read_policy():

        options = _options.ReadOptions(read_policy=_datastore_api.EVENTUAL_CONSISTENCY)