class_docstr: Helper methods for Vertex Handler.
class_docstr_tok: ["Helper","methods","for","Vertex","Handler","."]
docstr: Creates or updates a pipeline to use in Vertex Pipelines.
  
  Args:
    update: set as true to update pipeline.
docstr_tok: ["Creates","or","updates","a","pipeline","to","use","in","Vertex","Pipelines",".","Args",":","update",":","set","as","true","to","update","pipeline","."]
code: def create_pipeline(self, update: bool = False) -> None:
      """Creates or updates a pipeline to use in Vertex Pipelines.
  
      Args:
        update: set as true to update pipeline.
      """
      if self.flags_dict.get(labels.BUILD_IMAGE):
          build_image_fn = functools.partial(
              kubeflow_handler.create_container_image,
              base_image=self.flags_dict.get(labels.BASE_IMAGE),
          )
      else:
          build_image_fn = None
  
      patcher = (
          kubeflow_v2_dag_runner_patcher.KubeflowV2DagRunnerPatcher(
              call_real_run=True,
              build_image_fn=build_image_fn,
              prepare_dir_fn=functools.partial(
                  self._prepare_pipeline_dir, required=update
              ),
          )
      )
      context = self.execute_dsl(patcher)
      pipeline_name = context[patcher.PIPELINE_NAME]
  
      if update:
          click.echo(
              'Pipeline "{}" updated successfully.'.format(
                  pipeline_name
              )
          )
      else:
          click.echo(
              'Pipeline "{}" created successfully.'.format(
                  pipeline_name
              )
          )
  
imports: import functools
  import os
  import sys
  import click
  from google.cloud import aiplatform
  from google.cloud.aiplatform import pipeline_jobs
  from tfx.dsl.io import fileio
  from tfx.tools.cli import labels
  from tfx.tools.cli.handler import base_handler
  from tfx.tools.cli.handler import kubeflow_handler
  from tfx.tools.cli.handler import kubeflow_v2_dag_runner_patcher
  from tfx.utils import io_utils
label_desc: Use image node_id 1 for calling the VertexHandler obj's underlying member method code with example usage: obj.create_pipeline(update) without return types