code: def create_data():
      def _create_data(n_samples=117):
          rnd = np.random.RandomState(51365192)
          data_num = pd.DataFrame(
              rnd.rand(n_samples, 5),
              columns=[f"N{i}" for i in range(5)],
          )
  
          dat_cat = pd.DataFrame(
              OrderedDict(
                  [
                      (
                          "binary_1",
                          pd.Categorical.from_codes(
                              rnd.binomial(1, 0.6, n_samples),
                              ["Yes", "No"],
                          ),
                      ),
                      (
                          "binary_2",
                          pd.Categorical.from_codes(
                              rnd.binomial(1, 0.376, n_samples),
                              ["East", "West"],
                          ),
                      ),
                      (
                          "trinary",
                          pd.Categorical.from_codes(
                              rnd.binomial(2, 0.76, n_samples),
                              ["Green", "Blue", "Red"],
                          ),
                      ),
                      (
                          "many",
                          pd.Categorical.from_codes(
                              rnd.binomial(5, 0.47, n_samples),
                              [
                                  "One",
                                  "Two",
                                  "Three",
                                  "Four",
                                  "Five",
                                  "Six",
                              ],
                          ),
                      ),
                  ]
              )
          )
          data = pd.concat((data_num, dat_cat), axis=1)
          return data, _encoded_data(data)
  
      return _create_data
  
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 2 for calling a global function with example usage: create_data() and returns: _create_data, data,  _encoded_data