code: def test_search_space_transform_encoding() -> None:
      trans = _SearchSpaceTransform({"x0": IntDistribution(0, 3)})
  
      assert len(trans.column_to_encoded_columns) == 1
      numpy.testing.assert_equal(
          trans.column_to_encoded_columns[0], numpy.array([0])
      )
      numpy.testing.assert_equal(
          trans.encoded_column_to_column, numpy.array([0])
      )
  
      trans = _SearchSpaceTransform(
          {"x0": CategoricalDistribution(["foo", "bar", "baz"])}
      )
  
      assert len(trans.column_to_encoded_columns) == 1
      numpy.testing.assert_equal(
          trans.column_to_encoded_columns[0], numpy.array([0, 1, 2])
      )
      numpy.testing.assert_equal(
          trans.encoded_column_to_column, numpy.array([0, 0, 0])
      )
  
      trans = _SearchSpaceTransform(
          {
              "x0": FloatDistribution(0, 3),
              "x1": CategoricalDistribution(["foo", "bar", "baz"]),
              "x3": FloatDistribution(0, 1, step=0.2),
          }
      )
  
      assert len(trans.column_to_encoded_columns) == 3
      numpy.testing.assert_equal(
          trans.column_to_encoded_columns[0], numpy.array([0])
      )
      numpy.testing.assert_equal(
          trans.column_to_encoded_columns[1], numpy.array([1, 2, 3])
      )
      numpy.testing.assert_equal(
          trans.column_to_encoded_columns[2], numpy.array([4])
      )
      numpy.testing.assert_equal(
          trans.encoded_column_to_column, numpy.array([0, 1, 1, 1, 2])
      )
  
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 2 for calling a global function with example usage: test_search_space_transform_encoding() without return types