code: def default_record_reader(
      input_pattern: str, message_factory: Callable[[], _MESSAGE_TYPE]
  ) -> Iterator[_MESSAGE_TYPE]:
      """TFRecord based record iterator."""
      for path in tf.io.gfile.glob(input_pattern):
          for record in tf.compat.v1.io.tf_record_iterator(path):
              m = message_factory()
              m.ParseFromString(record)
              yield m
  
imports: from typing import Callable, Iterable, Iterator, Optional, Type, TypeVar
  import apache_beam
  import tensorflow
  from google.protobuf import message
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 5 for calling a global function with example usage: default_record_reader(input_pattern, message_factory) without return types