code: def parse_text_proto(
      textproto: str,
      proto_class: Type[
          _P
      ] = execution_invocation_pb2.ExecutionInvocation,
  ) -> _P:
      """Parses and returns a textproto."""
      return text_format.Parse(textproto, proto_class())
  
imports: import base64
  import functools
  from typing import Any, Dict, Optional, Type, TypeVar
  import tensorflow
  from tfx.dsl.compiler import placeholder_utils
  from tfx.dsl.placeholder import placeholder
  from tfx.dsl.placeholder import proto_placeholder
  from tfx.orchestration.portable import data_types
  from tfx.proto.orchestration import execution_invocation_pb2
  from tfx.proto.orchestration import pipeline_pb2
  from google.protobuf import message
  from google.protobuf import text_format
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 2 for calling a global function with example usage: parse_text_proto(textproto, proto_class) and returns: text_format