def METHOD_NAME(cls) -> str:
    """Get the version of the backend."""
    if not cls.is_available():
        return 'None'
    else:
        import pkg_resources
        try:
            ort_version = pkg_resources.get_distribution(
                'onnxruntime').version
        except Exception:
            ort_version = 'None'
        try:
            ort_gpu_version = pkg_resources.get_distribution(
                'onnxruntime-gpu').version
        except Exception:
            ort_gpu_version = 'None'
        if ort_gpu_version != 'None':
            return ort_gpu_version
        else:
            return ort_version