code: def _tfrecord_dataset(
      tfrecord_files: Sequence[str],
      name_to_features: Mapping[str, tf.io.FixedLenFeature],
  ) -> tf.data.TFRecordDataset:
      """Creates a single-file dataset to be passed for BERT custom training.
  
      Args:
        tfrecord_files: Filepaths for the dataset.
        name_to_features: Maps record keys to feature types.
  
      Returns:
        Dataset containing BERT model input features and labels.
      """
      d = tf.data.TFRecordDataset(tfrecord_files)
      d = d.map(
          lambda record: _decode_record(record, name_to_features),
          num_parallel_calls=tf.data.AUTOTUNE,
      )
      return d
  
imports: import collections
  import hashlib
  import os
  import re
  from typing import Mapping, Sequence, Tuple, Union
  import tensorflow
  import tensorflow_hub
  from mediapipe.model_maker.python.core.data import cache_files
  from mediapipe.model_maker.python.text.text_classifier import bert_tokenizer
  from mediapipe.model_maker.python.text.text_classifier import dataset
label_desc: Use image node_id 3 for calling a global function with example usage: _tfrecord_dataset(tfrecord_files, name_to_features) and returns: d