code: def validate_torch_op_version(torch_info):
      if not OpBuilder.is_rocm_pytorch():
          current_cuda_version = ".".join(
              torch.version.cuda.split(".")[:2]
          )
          install_cuda_version = torch_info["cuda_version"]
          if install_cuda_version != current_cuda_version:
              raise RuntimeError(
                  "CUDA version mismatch! DeepSpeed ops were compiled and installed "
                  "with a different version than what is being used at runtime. "
                  f"Please re-install DeepSpeed or switch torch versions. "
                  f"Install CUDA version={install_cuda_version}, "
                  f"Runtime CUDA version={current_cuda_version}"
              )
      else:
          current_hip_version = ".".join(
              torch.version.hip.split(".")[:2]
          )
          install_hip_version = torch_info["hip_version"]
          if install_hip_version != current_hip_version:
              raise RuntimeError(
                  "HIP version mismatch! DeepSpeed ops were compiled and installed "
                  "with a different version than what is being used at runtime. "
                  f"Please re-install DeepSpeed or switch torch versions. "
                  f"Install HIP version={install_hip_version}, "
                  f"Runtime HIP version={current_hip_version}"
              )
  
imports: import os
  import sys
  import time
  import importlib
  from pathlib import Path
  import subprocess
  import shlex
  import shutil
  import tempfile
  import distutils.ccompiler
  import distutils.log
  import distutils.sysconfig
  from distutils.errors import CompileError, LinkError
  from abc import ABC, abstractmethod
  from typing import List
label_desc: Use image node_id 6 for calling the OpBuilder obj's underlying member method code with example usage: obj.validate_torch_op_version(torch_info) without return types