class_docstr: Helper methods for Kubeflow Handler.
class_docstr_tok: ["Helper","methods","for","Kubeflow","Handler","."]
docstr: Initialize Kubeflow handler.
  
  Args:
    flags_dict: A dictionary with flags provided in a command.
docstr_tok: ["Initialize","Kubeflow","handler",".","Args",":","flags_dict",":","A","dictionary","with","flags","provided","in","a","command","."]
code: def __init__(self, flags_dict: Dict[str, Any]):
      """Initialize Kubeflow handler.
  
      Args:
        flags_dict: A dictionary with flags provided in a command.
      """
      super().__init__(flags_dict)
      # TODO(b/132286477): Change to setup config instead of flags if needed.
      if labels.NAMESPACE in self.flags_dict:
          self._client = kfp.Client(
              host=self.flags_dict[labels.ENDPOINT],
              client_id=self.flags_dict[labels.IAP_CLIENT_ID],
              namespace=self.flags_dict[labels.NAMESPACE],
          )
      else:
          self._client = None
  
imports: import functools
  import os
  import sys
  import time
  from typing import Any, Dict, Optional
  import click
  import kfp
  from tfx.orchestration.kubeflow import kubeflow_dag_runner
  from tfx.tools.cli import labels
  from tfx.tools.cli.container_builder import builder
  from tfx.tools.cli.handler import base_handler
  from tfx.tools.cli.handler import kubeflow_dag_runner_patcher
label_desc: Use image node_id 1 to create a new KubeflowHandler object from inherited base classes: base_handler with example: obj = KubeflowHandler(flags_dict)