human
Complete this python program:
def commit_manually(func):
assistant
#Here is the Python code you requested.

    """Decorator that activates manual transaction control. It just disables
    automatic transaction control and doesn\t do any commit/rollback of its
    own -- it\s up to the user to call the commit and rollback functions
    themselves.
    """
    def _commit_manually(*args, **kw):
        try:
            enter_transaction_management()
            managed(True)
            return func(*args, **kw)
        finally:
            leave_transaction_management()
    return _commit_manually