code: def test_unseen_categories(df):
      df_train, df_test = df[:4], df[4:]
  
      X_train, y_train = (
          df_train[["a", "b", "c", "d"]],
          df_train[["e"]].values.ravel(),
      )
      X_test = df_test[["a", "b", "c", "d"]]
  
      trf = FormulaicTransformer("a + np.log(a) + b + c + d - 1")
      _ = trf.fit(X_train, y_train)
  
      assert (
          trf.transform(X_test).shape[1]
          == trf.transform(X_train).shape[1]
      )
  
      pipe = Pipeline(
          [
              (
                  "design",
                  FormulaicTransformer("a + np.log(a) + b + c + d - 1"),
              ),
              ("scale", StandardScaler()),
              ("model", LogisticRegression(solver="lbfgs")),
          ]
      )
  
      _ = pipe.fit(X_train, y_train)
      assert pipe.predict(X_test).shape[0] == X_test.shape[0]
  
file_path: scikit-lego/tests/test_preprocessing/test_formulaic_transformer.py
imports: import joblib
  import numpy
  import pandas
  import pytest
  from scipy.sparse import spmatrix
  from sklearn.linear_model import LogisticRegression
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler
  from sklego.preprocessing import FormulaicTransformer
label_desc: Use image node_id 5 for calling a global function with example usage: test_unseen_categories(df) without return types