code: def test_given_categorical_input_feature_when_fit_regression_model_then_use_it_correctly():
      X0 = np.random.normal(0, 1, 1000)
      X1 = np.random.choice(3, 1000).astype(str)
      X2 = []
  
      for i in range(1000):
          tmp_value = 2 * X0[i]
  
          if X1[i] == "0":
              tmp_value -= 5
          elif X1[i] == "1":
              tmp_value += 10
          else:
              tmp_value += 5
  
          X2.append(tmp_value)
  
      X2 = np.array(X2)
  
      inputs = np.array([X0, X1], dtype=object).T
  
      mdl = create_linear_regressor()
      mdl.fit(inputs, X2)
  
      assert mdl.predict(np.array([[2, "1"]], dtype=object)) == approx(
          14
      )
      assert mdl.predict(inputs) == approx(X2.reshape(-1, 1))
  
file_path: dowhy/tests/gcm/test_ml.py
imports: import numpy
  import pytest
  from flaky import flaky
  from pytest import approx
  from sklearn.linear_model import LogisticRegression
  from dowhy.gcm.ml import SklearnClassificationModel, create_linear_regressor, create_linear_regressor_with_given_parameters, create_logistic_regression_classifier
label_desc: Use image node_id 1 for calling a global function with example usage: test_given_categorical_input_feature_when_fit_regression_model_then_use_it_correctly() without return types