code: def test_invalid_img(shape, dtype, encoding_format, err_msg):
      with pytest.raises(ValueError, match=err_msg):
          features_lib.Image(
              shape=shape, dtype=dtype, encoding_format=encoding_format
          )
  
imports: import contextlib
  import enum
  import os
  import pathlib
  from typing import Optional, Type
  from absl.testing import parameterized
  import numpy
  import PIL
  import pytest
  import tensorflow
  import tensorflow_datasets
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import features
label_desc: Use image node_id 5 for calling a global function with example usage: test_invalid_img(shape, dtype, encoding_format, err_msg) without return types