code: def test_sanity(codec, test_path, format):
      if features.check(codec):
          with TarIO.TarIO(TEST_TAR_FILE, test_path) as tar:
              with Image.open(tar) as im:
                  im.load()
                  assert im.mode == "RGB"
                  assert im.size == (128, 128)
                  assert im.format == format
  
file_path: pillow/Tests/test_file_tar.py
imports: from __future__ import annotations
  import warnings
  import pytest
  from PIL import Image, TarIO, features
  from .helper import is_pypy
label_desc: Use image node_id 1 for calling a global function with example usage: test_sanity(codec, test_path, format) without return types