class_docstr: Custom Producer Component.
class_docstr_tok: ["Custom","Producer","Component","."]
code: def __init__(
      self,
      stats: Optional[types.Channel] = None,
      stats_metadata: Optional[types.Channel] = None,
  ):
      stats = stats or types.Channel(
          type=standard_artifacts.ExampleStatistics
      )
      stats.additional_properties["span"] = 42
      stats.additional_properties["split_names"] = "['train', 'eval']"
      stats.additional_custom_properties["bar"] = "foo"
      stats.additional_custom_properties["baz"] = 0.5
  
      stats_metadata = stats_metadata or types.Channel(
          type=StatsMetadata
      )
      timestamp_value = pipeline_pb2.Value()
      timestamp_value.field_value.proto_value.Pack(
          timestamp_pb2.Timestamp(seconds=999999)
      )
      stats_metadata.additional_properties[
          "timestamp"
      ] = timestamp_value
      ttl_value = pipeline_pb2.Value()
      ttl_value.field_value.proto_value.Pack(
          duration_pb2.Duration(seconds=600)
      )
  
      stats_metadata.additional_properties["ttl"] = ttl_value
      spec = CustomProducerSpec(
          stats=stats, stats_metadata=stats_metadata
      )
      super().__init__(spec=spec)
  
imports: import os
  from typing import Any, Dict, List, Optional
  from tfx import types
  from tfx.dsl.components.base import base_component
  from tfx.dsl.components.base import base_executor
  from tfx.dsl.components.base import executor_spec
  from tfx.orchestration import pipeline
  from tfx.proto.orchestration import pipeline_pb2
  from tfx.types import component_spec
  from tfx.types import standard_artifacts
  from tfx.types.artifact import Artifact
  from tfx.types.artifact import Property
  from tfx.types.artifact import PropertyType
  from google.protobuf import duration_pb2
  from google.protobuf import timestamp_pb2
label_desc: Use image node_id 1 to create a new CustomProducer object from inherited base classes: base_component with example: obj = CustomProducer(stats, stats_metadata)