code: def copyfile(
      source: str | os.PathLike[str], dest: str | os.PathLike[str]
  ) -> None:
      """Copy a file and its modification times, if possible.
  
      Note: ``copyfile`` skips copying if the file has not been changed
      """
      if not path.exists(dest) or not filecmp.cmp(source, dest):
          shutil.copyfile(source, dest)
          with contextlib.suppress(OSError):
              # don't do full copystat because the source may be read-only
              copytimes(source, dest)
  
imports: from __future__ import annotations
  import contextlib
  import filecmp
  import os
  import re
  import shutil
  import sys
  import unicodedata
  from io import StringIO
  from os import path
  from typing import TYPE_CHECKING, Any
  from sphinx.deprecation import _deprecation_warning
label_desc: Use image node_id 8 for calling a global function with example usage: copyfile(source, dest) without return types