code: def testBuildOutputArtifactSpec(self):
      example_channel = channel.Channel(
          type=standard_artifacts.Examples
      )
      example_channel.additional_properties["span"] = 1
      example_channel.additional_custom_properties["int_param"] = 42
      example_channel.additional_custom_properties["str_param"] = "42"
      spec = compiler_utils.build_output_artifact_spec(example_channel)
      expected_spec = text_format.Parse(
          """
          artifact_type {
            instance_schema: "title: tfx.Examples\\ntype: object\\nproperties:\\n  span:\\n    type: integer\\n    description: Span for an artifact.\\n  version:\\n    type: integer\\n    description: Version for an artifact.\\n  split_names:\\n    type: string\\n    description: JSON-encoded list of splits for an artifact. Empty string means artifact has no split.\\n"
          }
          metadata {
            fields {
              key: "int_param"
              value {
                number_value: 42.0
              }
            }
            fields {
              key: "span"
              value {
                number_value: 1.0
              }
            }
            fields {
              key: "str_param"
              value {
                string_value: "42"
              }
            }
          }
          """,
          pipeline_pb2.ComponentOutputsSpec.ArtifactSpec(),
      )
      self.assertProtoEquals(spec, expected_spec)
  
      # Empty output channel with only type info.
      model_channel = channel.Channel(type=standard_artifacts.Model)
      spec = compiler_utils.build_output_artifact_spec(model_channel)
      expected_spec = text_format.Parse(
          """
          artifact_type {
            instance_schema: "title: tfx.Model\\ntype: object\\n"
          }
          """,
          pipeline_pb2.ComponentOutputsSpec.ArtifactSpec(),
      )
      self.assertProtoEquals(spec, expected_spec)
  
imports: import os
  from absl.testing import parameterized
  from kfp.pipeline_spec import pipeline_spec_pb2
  import tensorflow
  from tfx.dsl.io import fileio
  from tfx.orchestration import data_types
  from tfx.orchestration.kubeflow.v2 import compiler_utils
  from tfx.types import artifact
  from tfx.types import channel
  from tfx.types import channel_utils
  from tfx.types import standard_artifacts
  from tfx.types.experimental import simple_artifacts
  import yaml
  from google.protobuf import text_format
label_desc: Use image node_id 11 for calling the CompilerUtilsTest obj's underlying member method code with example usage: obj.testBuildOutputArtifactSpec() without return types