class_docstr: Helper methods for Kubeflow Handler.
class_docstr_tok: ["Helper","methods","for","Kubeflow","Handler","."]
code: def _get_pipeline_version_id(self, pipeline_id: str) -> Optional[str]:
      # Get the latest version.
      response = self._client.list_pipeline_versions(
          pipeline_id, page_size=1, sort_by="created_at desc"
      )
      assert len(response.versions) == 1
      return response.versions[0].id
  
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 17 for calling the KubeflowHandler obj's underlying member method code with example usage: obj._get_pipeline_version_id(pipeline_id) and returns: response