code: def _input_fn(
      file_patterns, data_accessor, batch_size
  ) -> tf.data.Dataset:
      """Returns a dataset of decoded tensors."""
  
      def prepare_label(parsed_ragged_tensors):
          label = parsed_ragged_tensors.pop(features.LABEL)
          # Convert labels to a dense tensor.
          label = label.to_tensor(
              default_value=features.LABEL_PADDING_VALUE
          )
          return parsed_ragged_tensors, label
  
      # NOTE: this dataset already contains RaggedTensors from the Decoder.
      dataset = data_accessor.tf_dataset_factory(
          file_patterns,
          tfxio.TensorFlowDatasetOptions(batch_size=batch_size),
          schema=None,
      )
      return dataset.map(prepare_label).repeat()
  
file_path: tfx/tfx/examples/ranking/ranking_utils.py
imports: import tensorflow
  import tensorflow_ranking
  import tensorflow_transform
  from tfx.examples.ranking import features
  from tfx.examples.ranking import struct2tensor_parsing_utils
  from tfx_bsl.public import tfxio
label_desc: Use image node_id 4 for calling a global function with example usage: _input_fn(file_patterns, data_accessor, batch_size) and returns: dataset, parsed_ragged_tensors,  label