code: def test_error_when_entered_variables_not_in_df(df_vartypes):
      transformer = RelativeFeatures(
          variables=["FeatOutsideDataset", "Age"],
          reference=["Age", "Name"],
          func=["sub"],
      )
      with pytest.raises(KeyError):
          transformer.fit_transform(df_vartypes)
  
      transformer = RelativeFeatures(
          reference=["FeatOutsideDataset", "Age"],
          variables=["Age", "Name"],
          func=["sub"],
      )
      with pytest.raises(TypeError):
          transformer.fit_transform(df_vartypes)
  
imports: import numpy
  import pandas
  import pytest
  from sklearn.pipeline import Pipeline
  from feature_engine.creation import RelativeFeatures
label_desc: Use image node_id 7 for calling a global function with example usage: test_error_when_entered_variables_not_in_df(df_vartypes) without return types