def validate_input_mount(input_mount: Path) -> None:
    """Validates that the input mount is a directory and contains files."""
    input_mount = input_mount.resolve()
    if not input_mount.exists():
        raise ValueError(
            f"Path for 'input_mount' argument '{input_mount}' does not exist."
        )
    if not input_mount.is_dir():
        raise ValueError(
            f"Path for 'input_mount' argument '{input_mount}' is not a directory."
        )
    if not _dir_contains_image_or_video(path=input_mount):
        raise ValueError(
            f"Path for 'input_mount' argument '{input_mount}' does not contain any "
            "images or videos. Please verify that this is the correct directory. See "
            "our docs on lightly-serve for more information: "
            "https://docs.lightly.ai/docs/local-storage#optional-after-run-view-local-data-in-lightly-platform"
        )
Validates that the input mount is a directory and contains files.
lightly/api/serve.py