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: cgi_exception.rb
    path of file: ./repos/facets/work/consider/cgi-exception-0.1.0/lib
    
    the code of the file until where you have to start completion: ##
## $Rev: 1 $
## $Release: 0.1.0 $
## copyright(c) 2007 kuwata-lab.com all r
    
def _print_stack_trace(ex, out=$stderr, header="Content-Type: text/html\r\n")
  out ||= $stderr
  out << header << "\r\n" if header
  arr = ex.backtrace
  out << "<pre style=\"color:#CC0000\">"
  out << "<b>#{_esc_html arr[0]}: #{_esc_html ex.message} (#{ex.class.name})</b>\n"
  arr[1..-1].each {|s| out << "        from #{_esc_html s}\n" }
  out << "</pre>"
end