code: def test_fit_and_transform_raise_error_if_df_contains_na(
      df_normal_dist,
  ):
      df_na = df_normal_dist.copy()
      df_na.loc[1, "var"] = np.nan
  
      # test case 5: when dataset contains na, fit method
      with pytest.raises(ValueError):
          transformer = ArbitraryOutlierCapper(
              min_capping_dict={"var": -0.17486039103044}
          )
          transformer.fit(df_na)
  
      # test case 6: when dataset contains na, transform method
      with pytest.raises(ValueError):
          transformer = ArbitraryOutlierCapper(
              min_capping_dict={"var": -0.17486039103044}
          )
          transformer.fit(df_normal_dist)
          transformer.transform(df_na)
  
file_path: feature_engine/tests/test_outliers/test_arbitrary_capper.py
imports: import numpy
  import pandas
  import pytest
  from feature_engine.outliers import ArbitraryOutlierCapper
label_desc: Use image node_id 9 for calling a global function with example usage: test_fit_and_transform_raise_error_if_df_contains_na(df_normal_dist) without return types