def METHOD_NAME(
    cls,
    path: str,
    device: int,
    fstype: Optional[str],
) -> None:
    """
    Warn only once per device. This is used to avoid spamming the logs with
    the same message.
    """
    if device in cls.warned_devices:
        return
    cls.warned_devices.add(device)
    if fstype is None:
        logger.warning(
            f"Failed to determine filesystem type for {path} "
            f"(device id: {device}). "
            f"Using soft file locks to avoid potential data corruption."
        )
        return
    logger.warning(
        f"The lock file {path} is on a filesystem of type `{fstype}` "
        f"(device id: {device}). "
        f"Using soft file locks to avoid potential data corruption."
    )