code: def testSavePipeline(self):
      flags_dict = {
          labels.ENGINE_FLAG: self.engine,
          labels.PIPELINE_DSL_PATH: self.pipeline_path,
      }
      handler = beam_handler.BeamHandler(flags_dict)
      handler._save_pipeline({labels.PIPELINE_NAME: self.pipeline_name})
      self.assertTrue(
          fileio.exists(
              os.path.join(
                  handler._handler_home_dir, self.pipeline_name
              )
          )
      )
  
imports: import json
  import os
  import subprocess
  import sys
  from unittest import mock
  import tensorflow
  from tfx.dsl.components.base import base_driver
  from tfx.dsl.io import fileio
  from tfx.tools.cli import labels
  from tfx.tools.cli.handler import beam_handler
  from tfx.utils import test_case_utils
label_desc: Use image node_id 2 for calling the BeamHandlerTest obj's underlying member method code with example usage: obj.testSavePipeline() without return types