code: def format_file(file_path, add_header, strip_header, format_code):
      # Do not add a header here
      # Releaser assumes the lines in the file to be related to version
      if file_path.endswith("version.py"):
          return
  
      abs_path = os.path.abspath(file_path)
      with open(abs_path, "r+") as fd:
          file_data = fd.read()
          if add_header:
              LOG.info("Adding header: " + file_path)
              new_file_data = header + file_data
  
              fd.seek(0, 0)
              fd.truncate()
              fd.write(new_file_data)
  
          elif strip_header:
              LOG.info("Stripping headers : " + file_path)
              header_match = header_regex.match(file_data)
              if header_match is None:
                  return
  
              header_comment = header_match.group(1)
  
              new_file_data = file_data.replace(header_comment, "")
  
              fd.seek(0, 0)
              fd.truncate()
              fd.write(new_file_data)
  
          elif format_code:
              # LOG.info("Formatting File : " + file_path)
              # ISORT
              isort_command = (
                  f"{ISORT_BINARY} --profile  black  {file_path}"
              )
              os.system(isort_command)
  
              # AUTOPEP
              black_command = f"{BLACK_BINARY} -q {file_path}"
              os.system(black_command)
  
              # AUTOFLAKE
              autoflake_command = f"{FLAKE_BINARY} --config='{FLAKE8_CONFIG}' {file_path}"
              ret_val = os.system(autoflake_command)
              if ret_val:
                  sys.exit(1)
  
              # PYLINT
              pylint_command = f"{PYLINT_BINARY} --spelling-private-dict-file {ignored_words_file} --rcfile={PYLINTRC}  {file_path}"
              # LOG.warning(pylint_command)
              # ret_val = os.system(pylint_command)
              # if ret_val:
              #    sys.exit(1)
  
              # CHECK FOR INVALID WORDS (like print)
              with open(file_path, "r") as file:
                  for line_num, line in enumerate(file, start=1):
                      if (
                          file_path not in IGNORE_PRINT_FILES
                          and " print(" in line
                      ):
                          LOG.warning(
                              f"print() found in {file_path}, line {line_num}: {line.strip()}"
                          )
                          sys.exit(1)
  
      # END WITH
  
      fd.close()
  
file_path: evadb/script/formatting/formatter.py
imports: import argparse
  import functools
  import logging
  import os
  import re
  import subprocess
  import sys
  from pathlib import Path
  import asyncio
  import nbformat
  from nbformat.v4 import new_notebook, new_markdown_cell, new_code_cell
  from pathlib import Path
  import pkg_resources
label_desc: Use image node_id 4 for calling a global function with example usage: format_file(file_path, add_header, strip_header, format_code) without return types