human
Complete this python program:
def Transactional(_func=None, **kwargs):
assistant
#Here is the Python program you requested.

    """A decorator that makes sure a function is run in a transaction.
    Defaults propagation to datastore_rpc.TransactionOptions.ALLOWED, which means
    any existing transaction will be used in place of creating a new one.
    WARNING: Reading from the datastore while in a transaction will not see any
    changes made in the same transaction. If the function being decorated relies
    on seeing all changes made in the calling scoope, set
    propagation=datastore_rpc.TransactionOptions.NESTED.
    Args:
    _func: do not use.
    **kwargs: TransactionOptions configuration options.
    Returns:
    A wrapper for the given function that creates a new transaction if needed.
    """
    if (_func is not None):
        return Transactional()(_func)
    if (not kwargs.pop('require_new', None)):
        kwargs.setdefault('propagation', datastore_rpc.TransactionOptions.ALLOWED)
    options = datastore_rpc.TransactionOptions(**kwargs)
    def outer_wrapper(func):
        def inner_wrapper(*args, **kwds):
            return RunInTransactionOptions(options, func, *args, **kwds)
        return inner_wrapper
    return outer_wrapper