code: def test_search_space_transform_numerical(
      transform_log: bool,
      transform_step: bool,
      transform_0_1: bool,
      param: Any,
      distribution: BaseDistribution,
  ) -> None:
      trans = _SearchSpaceTransform(
          {"x0": distribution},
          transform_log=transform_log,
          transform_step=transform_step,
          transform_0_1=transform_0_1,
      )
  
      if transform_0_1:
          expected_low = 0.0
          expected_high = 1.0
      else:
          expected_low = distribution.low  # type: ignore
          expected_high = distribution.high  # type: ignore
          if isinstance(distribution, FloatDistribution):
              if transform_log and distribution.log:
                  expected_low = math.log(expected_low)
                  expected_high = math.log(expected_high)
              if transform_step and distribution.step is not None:
                  half_step = 0.5 * distribution.step
                  expected_low -= half_step
                  expected_high += half_step
          elif isinstance(distribution, IntDistribution):
              if transform_step:
                  half_step = 0.5 * distribution.step
                  expected_low -= half_step
                  expected_high += half_step
              if distribution.log and transform_log:
                  expected_low = math.log(expected_low)
                  expected_high = math.log(expected_high)
  
      for bound in trans.bounds:
          assert bound[0] == expected_low
          assert bound[1] == expected_high
  
      trans_params = trans.transform({"x0": param})
      assert trans_params.size == 1
      assert expected_low <= trans_params <= expected_high
      assert numpy.isclose(param, trans.untransform(trans_params)["x0"])
  
file_path: optuna/tests/test_transform.py
imports: import math
  from typing import Any
  import numpy
  import pytest
  from optuna._transform import _SearchSpaceTransform
  from optuna._transform import _untransform_numerical_param
  from optuna.distributions import BaseDistribution
  from optuna.distributions import CategoricalDistribution
  from optuna.distributions import FloatDistribution
  from optuna.distributions import IntDistribution
label_desc: Use image node_id 3 for calling a global function with example usage: test_search_space_transform_numerical(transform_log, transform_step, transform_0_1, param, distribution) without return types