class_docstr: A placeholder that evaluates to a proto message.
class_docstr_tok: ["A","placeholder","that","evaluates","to","a","proto","message","."]
code: def encode(
      self,
      component_spec: Optional[Type["_types.ComponentSpec"]] = None,
  ) -> placeholder_pb2.PlaceholderExpression:
      result = placeholder_pb2.PlaceholderExpression()
      op = result.operator.make_proto_op
      op.base.Pack(self._base_message)
      proto_utils.build_file_descriptor_set(
          self._base_message, op.file_descriptors
      )
  
      for key, value in self._fields.items():
          op.fields[key].MergeFrom(
              placeholder_base.encode_value_like(value, component_spec)
          )
  
      self._lift_up_descriptors(op)
  
      return result
  
file_path: tfx/tfx/dsl/placeholder/proto_placeholder.py
imports: from __future__ import annotations
  from typing import Dict, Generic, Iterator, List, Optional, Tuple, Type, TypeVar, Union
  from tfx.dsl.placeholder import placeholder_base
  from tfx.proto.orchestration import placeholder_pb2
  from tfx.utils import proto_utils
  from google.protobuf import any_pb2
  from google.protobuf import descriptor
  from google.protobuf import message
label_desc: Use image node_id 6 for calling the MakeProtoPlaceholder obj's underlying member method code with example usage: obj.encode(component_spec) and returns: result