code: def _convert_file(ext, filename):
      eol = file_formatter.check_eol(filename)
      with io.open(filename, "rt", encoding="utf_8_sig") as f:
          # 'utf_8_sig' enables to read UTF-8 formatting file with BOM
          original = str(f.read())
      converted = file_formatter.format_file(ext, original)
      write_content = str(converted)
  
      if not write_content == original:
          print("Formatting {}".format(filename))
          write_content = write_content.replace("\r\n", "\n")
          write_content = write_content.replace("\r", "\n")
          write_content = write_content.replace("\n", eol)
          with open(filename, "wt") as f:
              f.write(write_content)
  
imports: from __future__ import print_function
  import io
  import os
  import re
  import file_formatter
label_desc: Use image node_id 1 for calling a global function with example usage: _convert_file(ext, filename) without return types