class_docstr: DatasetBuilder for imagenet_pi dataset.
class_docstr_tok: ["DatasetBuilder","for","imagenet_pi","dataset","."]
docstr: Gets the annotator labels from the csv lines list.
docstr_tok: ["Gets","the","annotator","labels","from","the","csv","lines","list","."]
code: def _get_values_from_csv(self, input_csv, to_type=int):
      """Gets the annotator labels from the csv lines list."""
      # The input_csv contains lines such as
      # n02097047_2079.JPEG,165,196,196,196,196,196,196,196.
      values_dict = {}
      for cur_line in input_csv:
          elems = cur_line.split(",")
          filename = elems[0]
          values = [to_type(elem) for elem in elems[1:]]
          assert len(values) == NUM_MODEL_ANNOTATORS
          values_dict[filename] = values
      return values_dict
  
file_path: datasets/tensorflow_datasets/datasets/imagenet_pi/imagenet_pi_dataset_builder.py
imports: import io
  import os
  from etils import epath
  import numpy
  from tensorflow_datasets.datasets.imagenet2012 import imagenet_common
  import tensorflow_datasets.public_api
label_desc: Use image node_id 2 for calling the Builder obj's underlying member method code with example usage: obj._get_values_from_csv(input_csv, to_type) and returns: values_dict