code: def get_all_types_in_placeholder_expression(
      placeholder: placeholder_pb2.PlaceholderExpression,
  ) -> Set["placeholder_pb2.Placeholder.Type"]:
      """Returns all Placeholder.Type contained in a PlaceholderExpression."""
      if placeholder.HasField("placeholder"):
          return {placeholder.placeholder.type}
  
      if placeholder.HasField("value"):
          return set()
  
      if placeholder.HasField("operator"):
          operator_name = placeholder.operator.WhichOneof(
              "operator_type"
          )
          operator_pb = getattr(placeholder.operator, operator_name)
  
          if operator_name in get_unary_operator_names():
              expressions = [operator_pb.expression]
          elif operator_name in get_binary_operator_names():
              expressions = [operator_pb.lhs, operator_pb.rhs]
          elif operator_name in get_nary_operator_names():
              expressions = operator_pb.expressions
          elif operator_name == "make_proto_op":
              expressions = operator_pb.fields.values()
          else:
              raise ValueError(
                  f"Unrecognized placeholder operator {operator_name} in expression: "
                  f"{placeholder}"
              )
  
          types = set()
          for expression in expressions:
              types |= get_all_types_in_placeholder_expression(
                  expression
              )
          return types
  
      raise ValueError(
          f"Unrecognized placeholder expression: {placeholder}"
      )
  
imports: import base64
  import enum
  import functools
  import os
  import re
  from typing import Any, Callable, Dict, List, Set, Union, cast
  from absl import logging
  import attr
  from tfx.dsl.io import fileio
  from tfx.orchestration.portable import data_types
  from tfx.proto.orchestration import placeholder_pb2
  from tfx.types import artifact
  from tfx.types import artifact_utils
  from tfx.types import value_artifact
  from tfx.utils import json_utils
  from tfx.utils import proto_utils
  from google.protobuf import any_pb2
  from google.protobuf import descriptor
  from google.protobuf import json_format
  from google.protobuf import message
  from google.protobuf import text_format
label_desc: Use image node_id 9 for calling a global function with example usage: get_all_types_in_placeholder_expression(placeholder) and returns: unknown, set, types