human
Complete this python program:
def block_db_access(service_name):
assistant
#Here is the Python program you requested.

    """Blocks Nova DB access.
    """
    class NoDB(object, ):
        def __getattr__(self, attr):
            return self
        def __call__(self, *args, **kwargs):
            stacktrace = ''.join(traceback.format_stack())
            LOG.error('No    db    access    allowed    in    %(service_name)s:    %(stacktrace)s', dict(service_name=service_name, stacktrace=stacktrace))
            raise exception.DBNotAllowed(service_name)
    nova.db.api.IMPL = NoDB()