code: def test_categorical_transform_binary():
      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: import pytest
  import numbers
  import numpy
  import os
  import yaml
  from tempfile import NamedTemporaryFile
  from numpy.testing import assert_array_almost_equal
  from numpy.testing import assert_array_equal
  from numpy.testing import assert_equal
  from numpy.testing import assert_raises_regex
  from skopt import Optimizer
  from skopt.space import Space
  from skopt.space import Real
  from skopt.space import Integer
  from skopt.space import Categorical
  from skopt.space import check_dimension
  from skopt.utils import normalize_dimensions
label_desc: Use image node_id 10 for calling a global function with example usage: test_categorical_transform_binary() without return types