code: def write_file(filename, data):
      """
      Write data to filename
      Only write changed data to avoid updating timestamps unnecessarily
      """
      if os.path.exists(filename):
          with open(filename) as f:
              if data == f.read():
                  return
  
      with open(filename, "w") as fid:
          fid.write(data)
  
imports: import hashlib
  import io
  import os
  import re
  import sys
  import importlib.util
  import textwrap
  from os.path import join
label_desc: Use image node_id 9 for calling a global function with example usage: write_file(filename, data) without return types