code: def process_doc_file(code_file, add_new_line=True):
      """
      Process given file.
  
      Args:
          code_file (`str` or `os.PathLike`): The file in which we want to style the docstring.
      """
      with open(code_file, "r", encoding="utf-8", newline="\n") as f:
          code = f.read()
  
      # fmt: off
      splits = code.split("```")
      if len(splits) % 2 != 1:
          raise ValueError("The number of occurrences of ``` should be an even number.")
  
      splits = [s if i % 2 == 0 else process_code_block(s, add_new_line=add_new_line) for i, s in enumerate(splits)]
      clean_code = "```".join(splits)
      # fmt: on
  
      diff = clean_code != code
      if diff:
          print(f"Overwriting content of {code_file}.")
          with open(
              code_file, "w", encoding="utf-8", newline="\n"
          ) as f:
              f.write(clean_code)
  
file_path: optimum/tests/utils/prepare_for_doc_test.py
imports: import argparse
  import os
label_desc: Use image node_id 4 for calling a global function with example usage: process_doc_file(code_file, add_new_line) without return types