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: Download available IGC images.
code: def _download_images(self, opt: Opt):
      """
      Download available IGC images.
      """
      urls = []
      ids = []
      for dt in ["test", "val"]:
          df = os.path.join(
              self.get_data_path(opt), f"IGC_crowd_{dt}.csv"
          )
          with PathManager.open(df, newline="\n") as csv_file:
              reader = csv.reader(csv_file, delimiter=",")
              fields = []
              for i, row in enumerate(reader):
                  if i == 0:
                      fields = row
                  else:
                      data = dict(zip(fields, row))
                      urls.append(data["url"])
                      ids.append(data["id"])
      PathManager.mkdirs(self.get_image_path(opt))
      # Make one blank image
      image = Image.new("RGB", (100, 100), color=0)
      image.save(
          os.path.join(self.get_image_path(opt), self.blank_image_id),
          "JPEG",
      )
      # Download the rest
      download_multiprocess(
          urls, self.get_image_path(opt), dest_filenames=ids
      )
  
      # Remove bad images
      for fp in os.listdir(self.get_image_path(opt)):
          img_path = os.path.join(self.get_image_path(opt), fp)
          if PathManager.exists(img_path):
              try:
                  Image.open(img_path).convert("RGB")
              except OSError:
                  PathManager.rm(img_path)
  
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 10 for calling the IGCTeacher obj's underlying member method code with example usage: obj._download_images(opt) without return types