code: def terminate_run(
      ctx: Context,
      engine: str,
      run_id: str,
      endpoint: str,
      iap_client_id: str,
      namespace: str,
  ) -> None:
      """Command definition to stop a run."""
      click.echo("Terminating run.")
      ctx.flags_dict[labels.ENGINE_FLAG] = engine
      ctx.flags_dict[labels.RUN_ID] = run_id
      ctx.flags_dict[labels.ENDPOINT] = endpoint
      ctx.flags_dict[labels.IAP_CLIENT_ID] = iap_client_id
      ctx.flags_dict[labels.NAMESPACE] = namespace
      handler_factory.create_handler(ctx.flags_dict).terminate_run()
  
file_path: tfx/tfx/tools/cli/commands/run.py
imports: from typing import Iterable, Dict
  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: terminate_run(ctx, engine, run_id, endpoint, iap_client_id, namespace) without return types