code: def test_build_pipeline_idempotency(has_repeated_learners):
      test_df = pd.DataFrame(
          {"x": [1, 2, 3, 4, 5], "y": [2, 4, 6, 8, 10]}
      )
      orig_df = test_df.copy()
  
      mult_constant = 2
      expected_df = pd.DataFrame(
          {
              "x": np.array([1, 2, 3, 4, 5]) * mult_constant,
              "y": [2, 4, 6, 8, 10],
          }
      )
  
      def kwargs_learner(df):
          def p(dataset, mult):
              return dataset.assign(x=dataset.x * mult)
  
          return (
              p,
              p(df, mult_constant),
              {"kwargs_learner": {"mult_constant": mult_constant}},
          )
  
      def dummy_learner(df):
          return (
              lambda dataset: dataset,
              df,
              {"dummy_learner": {"dummy": {}}},
          )
  
      for variation in itertools.permutations(
          [dummy_learner, kwargs_learner, dummy_learner]
      ):
          side_effect_pipeline = build_pipeline(
              *variation, has_repeated_learners=has_repeated_learners
          )
          predict_fn, result_df, log = side_effect_pipeline(test_df)
  
          pd.testing.assert_frame_equal(test_df, orig_df)
          pd.testing.assert_frame_equal(result_df, expected_df)
          pd.testing.assert_frame_equal(
              predict_fn(test_df, mult=mult_constant), expected_df
          )
  
file_path: fklearn/tests/training/test_pipeline.py
imports: import itertools
  import numpy
  import pandas
  import pytest
  import toolz
  from fklearn.training.imputation import placeholder_imputer
  from fklearn.training.pipeline import build_pipeline
  from fklearn.training.regression import xgb_regression_learner
  from fklearn.training.transformation import count_categorizer, onehot_categorizer
label_desc: Use image node_id 3 for calling a global function with example usage: test_build_pipeline_idempotency(has_repeated_learners) and returns: p,  p,  dict, function,  df,  dict, dataset