code: def test_fit(create_data):
      data, expected_data = create_data()
  
      t = OneHotEncoder().fit(data)
  
      assert t.feature_names_.tolist() == [
          "binary_1",
          "binary_2",
          "trinary",
          "many",
      ]
      assert set(t.encoded_columns_) == set(expected_data.columns)
  
      assert t.categories_ == {
          k: data[k].cat.categories
          for k in ["binary_1", "binary_2", "trinary", "many"]
      }
  
file_path: scikit-survival/tests/test_preprocessing.py
imports: from collections import OrderedDict
  import numpy
  from numpy.testing import assert_array_equal
  import pandas
  import pandas.testing
  import pytest
  from sksurv.preprocessing import OneHotEncoder
label_desc: Use image node_id 1 for calling the TestOneHotEncoder obj's underlying member method code with example usage: obj.test_fit(create_data) without return types