class_docstr: Unit Tests for the ImageLoader.
docstr: Test non-featurized image modes.
docstr_tok: ["Test","non-featurized","image","modes","."]
code: def test_other_image_modes(self):
      """
      Test non-featurized image modes.
      """
      with testing_utils.tempdir() as tmp:
          image_file = "tmp.jpg"
          image_path = os.path.join(tmp, image_file)
          image_zip_path = os.path.join(tmp, "tmp.zip")
          image = Image.new("RGB", (16, 16), color=0)
  
          with PathManager.open(image_path, "wb") as fp:
              image.save(fp, "JPEG")
  
          with zipfile.ZipFile(
              PathManager.open(image_zip_path, "wb"), mode="w"
          ) as zipf:
              zipf.write(image_path, arcname=image_file)
  
          for im in ["raw", "ascii"]:
              loader = ImageLoader({"image_mode": im})
              loader.load(image_path)
              loader.load(f"{image_zip_path}/{image_file}")
  
file_path: ParlAI/tests/test_image_featurizers.py
imports: import os
  from PIL import Image
  import unittest
  import torch
  import zipfile
  from parlai.core.image_featurizers import ImageLoader
  from parlai.core.params import ParlaiParser
  from parlai.core.teachers import create_task_agent_from_taskname
  from parlai.utils.io import PathManager
  import parlai.utils.testing
label_desc: Use image node_id 4 for calling the TestImageLoader obj's underlying member method code with example usage: obj.test_other_image_modes() without return types