class_docstr: A class to load dataset for TFR-BERT task.
class_docstr_tok: ["A","class","to","load","dataset","for","TFR-BERT","task","."]
docstr: Maps feature names in data to feature names of encoder models.
code: def _parse(
      self, record: Mapping[str, tf.Tensor]
  ) -> Tuple[Dict[str, tf.Tensor], tf.Tensor]:
      """Maps feature names in data to feature names of encoder models."""
      x, y = super()._parse(record)
      feature_name_mapping = {
          "input_ids": "input_word_ids",
          "input_mask": "input_mask",
          "segment_ids": "input_type_ids",
      }
      converted_x = {
          feature_name_mapping.get(name, name): tensor
          for name, tensor in x.items()
      }
      return converted_x, y
  
imports: import dataclasses
  import os
  import time
  from typing import Dict, Mapping, Optional, Tuple
  from absl import logging
  import numpy
  import tensorflow
  from official.core import task_factory
  from official.modeling.hyperparams import base_config
  from official.nlp.configs import encoders
  from tensorflow_ranking.extension import task
  from tensorflow_ranking.python.keras import metrics
  from tensorflow_ranking.python.keras import model
label_desc: Use image node_id 2 for calling the TFRBertDataLoader obj's underlying member method code with example usage: obj._parse(record) and returns: converted_x,  y