code: def check_environment(pytestconfig):
      expected_torch_version = pytestconfig.getoption("torch_ver")
      expected_cuda_version = pytestconfig.getoption("cuda_ver")
      if expected_torch_version is None:
          warnings.warn(
              "Running test without verifying torch version, please provide an expected torch version with --torch_ver"
          )
      elif not validate_version(
          expected_torch_version, torch.__version__
      ):
          pytest.exit(
              f"expected torch version {expected_torch_version} did not match found torch version {torch.__version__}",
              returncode=2,
          )
      if expected_cuda_version is None:
          warnings.warn(
              "Running test without verifying cuda version, please provide an expected cuda version with --cuda_ver"
          )
      elif not validate_version(
          expected_cuda_version, torch.version.cuda
      ):
          pytest.exit(
              f"expected cuda version {expected_cuda_version} did not match found cuda version {torch.version.cuda}",
              returncode=2,
          )
  
file_path: H2O/h2o_flexgen/benchmark/third_party/DeepSpeed/tests/conftest.py
imports: import sys
  import pytest
  import os
  from os.path import abspath, dirname, join
  import torch
  import warnings
label_desc: Use image node_id 3 for calling a global function with example usage: check_environment(pytestconfig) without return types