code: def serialize_executable_spec(
      executable_spec: Union[
          executable_spec_pb2.PythonClassExecutableSpec,
          executable_spec_pb2.BeamExecutableSpec,
      ]
  ) -> str:
      """Serializes an executable spec into a base64 flag."""
      return base64.b64encode(
          executable_spec.SerializeToString()
      ).decode("ascii")
  
file_path: tfx/tfx/orchestration/python_execution_binary/python_execution_binary_utils.py
imports: import base64
  from typing import Union
  from tfx.orchestration import metadata
  from tfx.orchestration.portable import data_types
  from tfx.proto.orchestration import executable_spec_pb2
  from tfx.proto.orchestration import execution_invocation_pb2
  from tfx.proto.orchestration import metadata_pb2
label_desc: Use image node_id 5 for calling a global function with example usage: serialize_executable_spec(executable_spec) and returns: base64