code: def test_return_type_dmatrix(df):
      X, y = df[["a", "b", "c", "d"]], df[["e"]]
      tf = PatsyTransformer("a + b - 1", return_type="matrix")
      # test for DesignMatrix this way as per https://patsy.readthedocs.io/en/latest/API-reference.html#patsy.DesignMatrix
      df_fit_transformed = tf.fit(X, y).transform(X)
      assert hasattr(df_fit_transformed, "design_info")
  
file_path: scikit-lego/tests/test_preprocessing/test_patsy_transformer.py
imports: import numpy
  import pandas
  import pytest
  from sklearn.linear_model import LogisticRegression
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler
  from sklego.preprocessing import PatsyTransformer
label_desc: Use image node_id 2 for calling a global function with example usage: test_return_type_dmatrix(df) without return types