code: def _parse_gender(label_str):
      """Parse gender string from STM "<label>" field."""
      gender = re.split(",|_", label_str)[-1][:-1]
      # Fix inconsistencies in the data.
      if not gender:
          gender = -1  # Missing label.
      elif gender == "<NA":  # In TEDLIUM release 3 training data.
          gender = -1  # Missing label.
      elif gender == "F":
          gender = "female"
      elif gender == "M":
          gender = "male"
      return gender
  
file_path: datasets/tensorflow_datasets/datasets/tedlium/tedlium_dataset_builder.py
imports: import os
  import re
  from etils import epath
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  import tensorflow_datasets.public_api
label_desc: Use image node_id 4 for calling a global function with example usage: _parse_gender(label_str) and returns: gender