code: def test_categorical_transform_binary():
      # TODO: Refactor - Use PyTest
      categories = ["apple", "orange"]
      cat = Categorical(categories)
  
      apple = [0.0]
      orange = [1.0]
  
      assert_equal(cat.transformed_size, 1)
      assert_equal(cat.transformed_size, cat.transform(["apple"]).size)
      assert_array_equal(cat.transform(categories), [apple, orange])
      assert_array_equal(
          cat.transform(["apple", "orange"]), [apple, orange]
      )
      assert_array_equal(
          cat.inverse_transform([apple, orange]), ["apple", "orange"]
      )
      ent_inverse = cat.inverse_transform([apple, orange])
      assert_array_equal(ent_inverse, categories)
  
imports: from hyperparameter_hunter.optimization.backends.skopt.engine import Optimizer
  from hyperparameter_hunter.space.dimensions import Real, Integer, Categorical
  from hyperparameter_hunter.space.space_core import Space, check_dimension, normalize_dimensions
  import numbers
  import numpy
  import pytest
  from sklearn.utils.testing import assert_array_almost_equal, assert_array_equal, assert_equal
label_desc: Use image node_id 11 for calling a global function with example usage: test_categorical_transform_binary() without return types