class_docstr: Tfx runner on Beam.
class_docstr_tok: ["Tfx","runner","on","Beam","."]
docstr: Builds LocalPlatformConfig given the any proto from IntermediateDeploymentConfig.
docstr_tok: ["Builds","LocalPlatformConfig","given","the","any","proto","from","IntermediateDeploymentConfig","."]
code: def _build_local_platform_config(
      self, node_id: str, spec: any_pb2.Any
  ) -> local_deployment_config_pb2.LocalPlatformConfig:
      """Builds LocalPlatformConfig given the any proto from IntermediateDeploymentConfig."""
      result = local_deployment_config_pb2.LocalPlatformConfig()
      if spec.Is(result.docker_platform_config.DESCRIPTOR):
          spec.Unpack(result.docker_platform_config)
      else:
          raise ValueError(
              "Platform config of {} is expected to be of one of the "
              "types of tfx.orchestration.deployment_config.LocalPlatformConfig.config "
              "but got type {}".format(node_id, spec.type_url)
          )
      return result
  
imports: import datetime
  from typing import Any, Iterable, List, Optional
  from absl import logging
  import apache_beam
  from tfx.dsl.compiler import constants
  from tfx.orchestration import metadata
  from tfx.orchestration.beam.legacy import beam_dag_runner
  from tfx.orchestration.config import pipeline_config
  from tfx.orchestration.local import runner_utils
  from tfx.orchestration.portable import launcher
  from tfx.orchestration.portable import partial_run_utils
  from tfx.orchestration.portable import runtime_parameter_utils
  from tfx.orchestration.portable import tfx_runner
  from tfx.proto.orchestration import local_deployment_config_pb2
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.utils import telemetry_utils
  from google.protobuf import any_pb2
  from google.protobuf import message
label_desc: Use image node_id 3 for calling the BeamDagRunner obj's underlying member method code with example usage: obj._build_local_platform_config(node_id, spec) and returns: result