code: def replace_if_starts_with(
      file: str, starts_with: str, replace: str = ""
  ) -> None:
      new_lines = []
      with open(file) as f:
          for line in f.readlines():
              if line.startswith(starts_with):
                  line = replace
                  if len(replace) > 0:
                      line = line + "\n"
  
              new_lines += [line]
  
      # Empty file
      with open(file, "w") as f:
          f.write("")
  
      # Save file with new lines
      with open(file, "a") as f:
          for line in new_lines:
              f.write(line)
  
label_desc: Use image node_id 2 for calling a global function with example usage: replace_if_starts_with(file, starts_with, replace) without return types