class_docstr: Serializes the proto if needed.
class_docstr_tok: ["Serializes","the","proto","if","needed","."]
code: def __init__(self):
      self._num_instances = beam.metrics.Metrics.counter(
          METRICS_NAMESPACE, "num_instances"
      )
  
file_path: tfx/tfx/components/example_gen/write_split.py
imports: import os
  from typing import Optional, Any, Dict, Union
  import apache_beam
  import tensorflow
  from tfx.proto import example_gen_pb2
  from tfx.types import standard_component_specs
  from tfx.utils import deprecation_utils
  from tfx_bsl.telemetry import util
label_desc: Use image node_id 1 to create a new MaybeSerialize object from inherited base classes: beam with example: obj = MaybeSerialize()