code: def testCreateAtlasWithFailures(self):
      # Verify that atlas is correct based on sampling pixels and output size.
      # when one of the images failed retrival/conversion.
      atlas_settings = montage.SpriteAtlasSettings(img_format="png")
      source_paths = [
          "/some/path/file" + str(i) + ".jpg" for i in range(0, 4)
      ]
      images_with_statuses = [
          (Image.new("RGBA", (50, 50), self.orange_rgb), ""),
          (Image.new("RGBA", (50, 50), self.red_rgb), ""),
          (None, "some error message"),  # Failed
          (Image.new("RGBA", (50, 50), self.yellow_rgb), ""),
      ]
  
      atlas_generator = montage.SpriteAtlasGenerator(
          images_with_statuses=images_with_statuses,
          img_src_paths=source_paths,
          atlas_settings=atlas_settings,
          default_img=Image.new("RGBA", (50, 50), self.black_rgb),
      )
      atlases, manifests = atlas_generator.create_atlas()
      atlas = atlases[0]  # Only care about a single atlas
      del manifests
  
      self.assertEqual(atlas.size, (100, 100))
      # Verify pixels in corners of atlas.
      self.assertEqual(atlas.getpixel((0, 0))[0:3], self.orange_rgb)
      self.assertEqual(atlas.getpixel((99, 0))[0:3], self.red_rgb)
      self.assertEqual(atlas.getpixel((0, 99))[0:3], self.black_rgb)
      self.assertEqual(atlas.getpixel((99, 99))[0:3], self.yellow_rgb)
      # Verify pixels in center of atlas
      self.assertEqual(atlas.getpixel((49, 49))[0:3], self.orange_rgb)
      self.assertEqual(atlas.getpixel((50, 49))[0:3], self.red_rgb)
      self.assertEqual(atlas.getpixel((49, 50))[0:3], self.black_rgb)
      self.assertEqual(atlas.getpixel((50, 50))[0:3], self.yellow_rgb)
  
file_path: facets/facets_atlasmaker/montage_test.py
imports: from absl.testing import absltest
  from PIL import Image
  from PIL import ImageColor
  import montage
label_desc: Use image node_id 6 for calling the SpriteAtlasGeneratorTests obj's underlying member method code with example usage: obj.testCreateAtlasWithFailures() without return types