class_docstr: Teacher for Image Grounded Conversations (IGC) Task.
  
  See https://arxiv.org/abs/1701.08251 for more details
class_docstr_tok: ["Teacher","for","Image","Grounded","Conversations","(","IGC",")","Task",".","See","https",":","\/\/arxiv.org\/abs\/1701.08251","for","more","details"]
docstr: Override to handle corrupt images and multi-reference labels.
code: def get(self, episode_idx: int, entry_idx: int = 0) -> dict:
      """
      Override to handle corrupt images and multi-reference labels.
      """
      entry_idx *= 2
  
      if episode_idx >= len(self.data):
          data = self.data[episode_idx % len(self.data)]
          entry_idx += 1
      else:
          data = self.data[episode_idx]
      image_id = data[self.image_id_key]
      if data[self.image_id_key] not in self.valid_image_ids:
          data[self.image_id_key] = self.blank_image_id
      image_features = self.get_image_features(data)
  
      conversation = [
          data["context"],
          data["question"],
          data["response"],
      ]
      labels = [conversation[entry_idx]]
      if self.multi_ref and entry_idx != 0:
          key = "questions" if entry_idx == 1 else "responses"
          labels = data[f"multiref_{key}"].split("***")
      text = "" if entry_idx == 0 else conversation[entry_idx - 1]
      episode_done = entry_idx >= len(conversation) - 2
  
      action = {
          "text": text,
          "image_id": image_id,
          "episode_done": episode_done,
          "image": image_features,
          "labels": labels,
      }
  
      return action
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  import csv
  import os
  from abc import ABC, abstractmethod
  from PIL import Image
  from typing import List, Dict, Any
  from parlai.core.build_data import download_multiprocess
  from parlai.core.params import Opt
  from parlai.core.teachers import AbstractImageTeacher
  from parlai.utils.io import PathManager
  import parlai.utils.typing
label_desc: Use image node_id 8 for calling the IGCTeacher obj's underlying member method code with example usage: obj.get(episode_idx, entry_idx) and returns: action