class_docstr: PythonDriverOperator handles python class based driver's init and execution.
class_docstr_tok: ["PythonDriverOperator","handles","python","class","based","driver","'s","init","and","execution","."]
docstr: Constructor.
  
  Args:
    driver_spec: The specification of how to initialize the driver.
    mlmd_connection: ML metadata connection.
  
  Raises:
    RuntimeError: if the driver_spec is not supported.
docstr_tok: ["Constructor",".","Args",":","driver_spec",":","The","specification","of","how","to","initialize","the","driver",".","mlmd_connection",":","ML","metadata","connection",".","Raises",":","RuntimeError",":","if","the","driver_spec","is","not","supported","."]
code: def __init__(
      self,
      driver_spec: message.Message,
      mlmd_connection: metadata.Metadata,
  ):
      """Constructor.
  
      Args:
        driver_spec: The specification of how to initialize the driver.
        mlmd_connection: ML metadata connection.
  
      Raises:
        RuntimeError: if the driver_spec is not supported.
      """
      super().__init__(driver_spec, mlmd_connection)
  
      python_class_driver_spec = cast(
          pipeline_pb2.ExecutorSpec.PythonClassExecutorSpec, driver_spec
      )
      self._driver = import_utils.import_class_by_path(
          python_class_driver_spec.class_path
      )(self._mlmd_connection)
  
file_path: tfx/tfx/orchestration/portable/python_driver_operator.py
imports: from typing import cast
  from tfx.orchestration import metadata
  from tfx.orchestration.portable import base_driver_operator
  from tfx.orchestration.portable import data_types
  from tfx.proto.orchestration import driver_output_pb2
  from tfx.proto.orchestration import executable_spec_pb2
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import import_utils
  from google.protobuf import message
label_desc: Use image node_id 1 to create a new PythonDriverOperator object from inherited base classes: base_driver_operator with example: obj = PythonDriverOperator(driver_spec, mlmd_connection)