code: def _input_fn(
      file_pattern: List[str],
      data_accessor: tfx.components.DataAccessor,
      schema: schema_pb2.Schema,
      label: str,
      batch_size: int = 200,
  ) -> tf.data.Dataset:
      """Generates features and label for tuning/training.
  
      Args:
        file_pattern: List of paths or patterns of input tfrecord files.
        data_accessor: DataAccessor for converting input to RecordBatch.
        schema: A schema proto of input data.
        label: Name of the label.
        batch_size: representing the number of consecutive elements of returned
          dataset to combine in a single batch
  
      Returns:
        A dataset that contains (features, indices) tuple where features is a
          dictionary of Tensors, and indices is a single Tensor of label indices.
      """
      return data_accessor.tf_dataset_factory(
          file_pattern,
          tfxio.TensorFlowDatasetOptions(
              batch_size=batch_size, label_key=label
          ),
          schema,
      ).repeat()
  
file_path: tfx/tfx/experimental/templates/penguin/models/model.py
imports: from typing import List
  from absl import logging
  import tensorflow
  from tensorflow import keras
  import tensorflow_transform
  from tensorflow_transform.tf_metadata import schema_utils
  from tfx import v1
  from tfx.experimental.templates.penguin.models import constants
  from tfx.experimental.templates.penguin.models import features
  from tfx_bsl.public import tfxio
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 3 for calling a global function with example usage: _input_fn(file_pattern, data_accessor, schema, label, batch_size) and returns: data_accessor