code: def process_multi_label_dataset(label_ds, config, output_index=None):
      """process multi-label data set."""
      logging.info("Loading multi label dataset...")
      label_vocab_file_path = config["data"]["task"]["label_vocab"]
      num_parallel_calls = config["data"]["task"]["num_parallel_calls"]
      max_seq_len = config["data"]["task"]["max_seq_len"]
  
      label_vocab_file_path = config["data"]["task"]["label_vocab"]
      if isinstance(label_vocab_file_path, list):
          if output_index is None or output_index not in range(
              len(label_vocab_file_path)
          ):
              raise IndexError(
                  "output_index:{} not in the range of classes length: "
                  "{}!".format(output_index, len(label_vocab_file_path))
              )
          label_vocab_file_path = label_vocab_file_path[output_index]
  
      else:
          label_vocab_file_path = label_vocab_file_path
  
      label_ds = label_ds.map(
          lambda x: tokenize_label(
              x,
              maxlen=max_seq_len,
              label_vocab_file_path=label_vocab_file_path,
              pad_id=0,
          ),
          num_parallel_calls=num_parallel_calls,
      )
      label_ds = label_ds.map(
          tf.squeeze, num_parallel_calls=num_parallel_calls
      )
  
      return label_ds
  
file_path: delta/delta/data/preprocess/text_ops.py
imports: import delta.compat
  from absl import logging
  from delta import utils
  from core.ops import py_x_ops
  from delta.data.utils import read_lines_from_text_file
label_desc: Use image node_id 8 for calling a global function with example usage: process_multi_label_dataset(label_ds, config, output_index) and returns: label_ds