def _natural_key(some_string):
    """Return a key that allows for natural sorting."""
    return [
        int(s) if s.isdigit() else s for s in re.split(r"(\d+)", some_string)
    ]
Return a key that allows for natural sorting.
photogrammetry_importer/utility/os_utility.py