code: def _adjust_alternative_to_scipy(alternative):
      """Scipy<1.8.0 supports only two-sided hypothesis testing."""
      if alternative is not None and not compare_version(
          "scipy", operator.ge, "1.8.0"
      ):
          return "two-sided"
      return alternative
  
file_path: torchmetrics/tests/unittests/regression/test_kendall.py
imports: import operator
  import sys
  from functools import partial
  import pytest
  import torch
  from lightning_utilities.core.imports import compare_version
  from scipy.stats import kendalltau
  from torchmetrics.functional.regression.kendall import kendall_rank_corrcoef
  from torchmetrics.regression.kendall import KendallRankCorrCoef
  from torchmetrics.utilities.imports import _SCIPY_GREATER_EQUAL_1_8, _TORCH_LOWER_2_0
  from unittests import BATCH_SIZE, EXTRA_DIM, NUM_BATCHES, _Input
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 2 for calling a global function with example usage: _adjust_alternative_to_scipy(alternative) and returns: alternative, str