class_docstr: DatasetBuilder for imagenet2012_multilabel dataset.
docstr: Yields (key, example) tuples from the dataset.
code: def _generate_examples(
      self, archive, original_labels, multi_labels, problematic_images
  ):
      """Yields (key, example) tuples from the dataset."""
      for fname, fobj in archive:
          if fname not in multi_labels:
              # Image is not in the annotated set of 20,000 images
              continue
          else:
              is_problematic = fname in problematic_images
              correct_multi_labels = []
              wrong_multi_labels = []
              unclear_multi_labels = []
              if "correct" in multi_labels[fname]:
                  correct_multi_labels = multi_labels[fname]["correct"]
              if "wrong" in multi_labels[fname]:
                  wrong_multi_labels = multi_labels[fname]["wrong"]
              if "unclear" in multi_labels[fname]:
                  unclear_multi_labels = multi_labels[fname]["unclear"]
  
          record = {
              "file_name": fname,
              "image": fobj,
              "original_label": original_labels[fname],
              "correct_multi_labels": correct_multi_labels,
              "wrong_multi_labels": wrong_multi_labels,
              "unclear_multi_labels": unclear_multi_labels,
              "is_problematic": is_problematic,
          }
          yield fname, record
  
file_path: datasets/tensorflow_datasets/datasets/imagenet2012_multilabel/imagenet2012_multilabel_dataset_builder.py
imports: import json
  import os
  import numpy
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  from tensorflow_datasets.datasets.imagenet2012 import imagenet_common
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the Builder obj's underlying member method code with example usage: obj._generate_examples(archive, original_labels, multi_labels, problematic_images) without return types