code: def update_pipeline(
      ctx: Context,
      engine: str,
      pipeline_path: str,
      package_path: Optional[str],
      skaffold_cmd: Optional[str],
      endpoint: Optional[str],
      iap_client_id: Optional[str],
      namespace: str,
      build_image: bool,
  ) -> None:
      """Command definition to update a pipeline."""
      # TODO(b/179847638): Delete checks for deprecated flags.
      _check_deprecated_image_build_flags(
          None, skaffold_cmd, package_path
      )
  
      click.echo("Updating pipeline")
      ctx.flags_dict[labels.ENGINE_FLAG] = engine
      ctx.flags_dict[labels.PIPELINE_DSL_PATH] = pipeline_path
      ctx.flags_dict[labels.ENDPOINT] = endpoint
      ctx.flags_dict[labels.IAP_CLIENT_ID] = iap_client_id
      ctx.flags_dict[labels.NAMESPACE] = namespace
      ctx.flags_dict[labels.BUILD_IMAGE] = build_image
      handler_factory.create_handler(ctx.flags_dict).update_pipeline()
  
file_path: tfx/tfx/tools/cli/commands/pipeline.py
imports: import sys
  from typing import Optional
  import click
  from tfx.tools.cli import labels
  from tfx.tools.cli.cli_context import Context
  from tfx.tools.cli.cli_context import pass_context
  from tfx.tools.cli.handler import handler_factory
label_desc: Use image node_id 4 for calling a global function with example usage: update_pipeline(ctx, engine, pipeline_path, package_path, skaffold_cmd, endpoint, iap_client_id, namespace, build_image) without return types