code: def test_log_step_logger(caplog, test_df):
      """Base test of log_step with a logger supplied instead of default print"""
      caplog.clear()
  
      @log_step(print_fn=logging.info)
      def do_something(df):
          return df.drop(0)
  
      @log_step(print_fn=logging.info)
      def do_nothing(df, *args, **kwargs):
          return df
  
      with caplog.at_level(logging.INFO):
          (
              test_df.pipe(do_nothing)
              .pipe(do_nothing, a="1")
              .pipe(do_something)
          )
  
      assert caplog.messages[0].startswith("[do_nothing(df)]")
      assert caplog.messages[1].startswith(
          "[do_nothing(df, kwargs = {'a': '1'})]"
      )
      assert caplog.messages[2].startswith("[do_something(df)]")
  
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 10 for calling a global function with example usage: test_log_step_logger(caplog, test_df) and returns: df, df