code: def should_write(filepath: str, new_content: str) -> bool:
      if not path.exists(filepath):
          return True
      try:
          with open(filepath, encoding="utf-8") as oldpot:
              old_content = oldpot.read()
              old_header_index = old_content.index(
                  '"POT-Creation-Date:'
              )
              new_header_index = new_content.index(
                  '"POT-Creation-Date:'
              )
              old_body_index = old_content.index('"PO-Revision-Date:')
              new_body_index = new_content.index('"PO-Revision-Date:')
              return (
                  old_content[:old_header_index]
                  != new_content[:new_header_index]
              ) or (
                  new_content[new_body_index:]
                  != old_content[old_body_index:]
              )
      except ValueError:
          pass
  
      return True
  
imports: from __future__ import annotations
  import time
  from codecs import open
  from collections import defaultdict
  from os import getenv, path, walk
  from typing import TYPE_CHECKING, Any
  from uuid import uuid4
  from docutils import nodes
  from sphinx import addnodes, package_dir
  from sphinx.builders import Builder
  from sphinx.errors import ThemeError
  from sphinx.locale import __
  from sphinx.util import logging
  from sphinx.util.console import bold
  from sphinx.util.display import status_iterator
  from sphinx.util.i18n import CatalogInfo, docname_to_domain
  from sphinx.util.index_entries import split_index_msg
  from sphinx.util.nodes import extract_messages, traverse_translatable_index
  from sphinx.util.osutil import canon_path, ensuredir, relpath
  from sphinx.util.tags import Tags
  from sphinx.util.template import SphinxRenderer
label_desc: Use image node_id 1 for calling a global function with example usage: should_write(filepath, new_content) and returns: True, True, unknown