code: def check_md5checksum_in_cache_modified(
      file_hash: str, cache_path: Path, update: bool
  ) -> bool:
      """
      Check if the file hash is present in cache and its content has been modified. Optionally updates
      the hash.
  
      :param file_hash: hash of the current version of the file
      :param cache_path: path where the hash is stored
      :param update: whether to update hash if it is found different
      :return: True if the hash file was missing or hash has changed.
      """
      if cache_path.exists():
          old_md5_checksum_content = Path(cache_path).read_text()
          if old_md5_checksum_content.strip() != file_hash.strip():
              if update:
                  save_md5_file(cache_path, file_hash)
              return True
      else:
          if update:
              save_md5_file(cache_path, file_hash)
          return True
      return False
  
file_path: airflow/dev/breeze/src/airflow_breeze/utils/md5_build_check.py
imports: from __future__ import annotations
  import hashlib
  import os
  import sys
  from pathlib import Path
  from typing import TYPE_CHECKING
  from airflow_breeze.global_constants import ALL_PROVIDER_YAML_FILES, FILES_FOR_REBUILD_CHECK
  from airflow_breeze.utils.console import get_console
  from airflow_breeze.utils.path_utils import AIRFLOW_SOURCES_ROOT
  from airflow_breeze.utils.run_utils import run_command
  from airflow_breeze.utils.shared_options import get_verbose
label_desc: Use image node_id 1 for calling a global function with example usage: check_md5checksum_in_cache_modified(file_hash, cache_path, update) and returns: False, True, True