You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: timeout_helpers.rb
    path of file: ./repos/gitlabhq/lib/gitlab/database/migrations
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Gitlab
  module Database
 
    
        def disable_statement_timeout
          if block_given?
            if statement_timeout_disabled?
              # Don't do anything if the statement_timeout is already disabled
              # Allows for nested calls of disable_statement_timeout without
              # resetting the timeout too early (before the outer call ends)
              yield
            else
              begin
                execute('SET statement_timeout TO 0')

                yield
              ensure
                execute('RESET statement_timeout')
              end
            end