code: def test_log_dtypes(dtypes, capsys, test_df):
      """Test logging of dtypes can be switched on and off"""
  
      @log_step(dtypes=dtypes)
      def do_nothing(df, *args, **kwargs):
          return df
  
      test_df.pipe(do_nothing)
  
      captured = capsys.readouterr()
  
      assert ("dtypes=" in captured.out) == dtypes
  
      if dtypes:
          assert str(test_df.dtypes.to_dict()) in captured.out
  
imports: import logging
  import numpy
  import pandas
  import pytest
  from sklego.pandas_utils import _add_lagged_numpy_columns, _add_lagged_pandas_columns, add_lags, log_step, log_step_extra
label_desc: Use image node_id 15 for calling a global function with example usage: test_log_dtypes(dtypes, capsys, test_df) and returns: df