code: def _sort_files(filenames: Iterable[str]) -> list[str]:
      return sorted(filenames, key=_file_sort_key)
  
imports: from __future__ import annotations
  import enum
  import fnmatch
  import logging
  import os
  import posixpath
  import shutil
  import warnings
  from pathlib import PurePath
  from typing import TYPE_CHECKING, Callable, Iterable, Iterator, Sequence
  from urllib.parse import quote
  import pathspec
  import pathspec.gitignore
  import pathspec.util
  from mkdocs import utils
label_desc: Use image node_id 4 for calling a global function with example usage: _sort_files(filenames) and returns: sorted