code: def test_pipeline_copy():
      scaler = StandardScaler(
          inputCol="features", outputCol="scaled_features"
      )
      lorv2 = LORV2(
          maxIter=200,
          numTrainWorkers=2,
          learningRate=0.001,
          featuresCol="scaled_features",
      )
  
      pipeline = Pipeline(stages=[scaler, lorv2])
  
      copied_pipeline = pipeline.copy(
          {
              scaler.inputCol: "f1",
              lorv2.maxIter: 10,
              lorv2.numTrainWorkers: 1,
          }
      )
  
      stages = copied_pipeline.getStages()
  
      assert stages[0].getInputCol() == "f1"
      assert stages[1].getOrDefault(stages[1].maxIter) == 10
      assert stages[1].getOrDefault(stages[1].numTrainWorkers) == 1
      assert (
          stages[1].getOrDefault(stages[1].featuresCol)
          == "scaled_features"
      )
  
      pipeline2 = Pipeline(stages=[pipeline])
      copied_pipeline2 = pipeline2.copy(
          {
              scaler.inputCol: "f2",
              lorv2.maxIter: 20,
              lorv2.numTrainWorkers: 20,
          }
      )
  
      stages = copied_pipeline2.getStages()[0].getStages()
  
      assert stages[0].getInputCol() == "f2"
      assert stages[1].getOrDefault(stages[1].maxIter) == 20
      assert stages[1].getOrDefault(stages[1].numTrainWorkers) == 20
      assert (
          stages[1].getOrDefault(stages[1].featuresCol)
          == "scaled_features"
      )
  
      # test original stage instance params are not modified after pipeline copying.
      assert scaler.getInputCol() == "features"
      assert lorv2.getOrDefault(lorv2.maxIter) == 200
  
file_path: spark/python/pyspark/ml/tests/connect/test_legacy_mode_pipeline.py
imports: import os
  import tempfile
  import unittest
  import numpy
  from pyspark.sql import SparkSession
  from pyspark.testing.connectutils import should_test_connect, connect_requirement_message
label_desc: Use image node_id 3 for calling the PipelineTestsMixin obj's underlying member method code with example usage: obj.test_pipeline_copy() without return types