code: def main():
      logging.set_verbosity(logging.INFO)
      flags.FLAGS(sys.argv)
      use_dataflow = flags.FLAGS.use_dataflow
      use_cloud_component = flags.FLAGS.use_cloud_component
      use_aip = flags.FLAGS.use_aip
      use_vertex = flags.FLAGS.use_vertex
  
      # Metadata config. The defaults works work with the installation of
      # KF Pipelines using Kubeflow. If installing KF Pipelines using the
      # lightweight deployment option, you may need to override the defaults.
  
      if use_dataflow:
          beam_pipeline_args = _beam_pipeline_args_by_runner[
              "DataflowRunner"
          ]
      else:
          beam_pipeline_args = _beam_pipeline_args_by_runner[
              "DirectRunner"
          ]
  
      if use_vertex:
          dag_runner = tfx.orchestration.experimental.KubeflowV2DagRunner(
              config=tfx.orchestration.experimental.KubeflowV2DagRunnerConfig(),
              output_filename=_pipeline_definition_file,
          )
      else:
          dag_runner = tfx.orchestration.experimental.KubeflowDagRunner(
              config=tfx.orchestration.experimental.KubeflowDagRunnerConfig(
                  kubeflow_metadata_config=tfx.orchestration.experimental.get_default_kubeflow_metadata_config()
              )
          )
  
          dag_runner.run(
              create_pipeline(
                  pipeline_name=_pipeline_name,
                  pipeline_root=_pipeline_root,
                  data_root=_data_root,
                  module_file=_module_file,
                  enable_tuning=False,
                  enable_cache=True,
                  user_provided_schema_path=_user_provided_schema,
                  ai_platform_training_args=_ai_platform_training_args,
                  ai_platform_serving_args=_ai_platform_serving_args,
                  beam_pipeline_args=beam_pipeline_args,
                  use_cloud_component=use_cloud_component,
                  use_aip=use_aip,
                  use_vertex=use_vertex,
                  serving_model_dir=_serving_model_dir,
              )
          )
  
file_path: tfx/tfx/examples/penguin/penguin_pipeline_kubeflow.py
imports: import os
  import sys
  from typing import Dict, List, Optional, Union
  from absl import flags
  from absl import logging
  import tensorflow_model_analysis
  from tfx import v1
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types