def do_something_that_needs_database():
    dbConnection = MySQLdb.connect(host=args['database_host'], user=args[
        'database_user'], passwd=args['database_pass'], db=args[
        'database_tabl'], cursorclass=MySQLdb.cursors.DictCursor)
In Python, how to make sure database connection will always close before leaving a code block?