code: def test_image_with_statically_defined_shape(self, make_lib_fail):
      with make_lib_fail():
          img_shaped = randint(256, size=(32, 64, 1), dtype=np.uint8)
  
          img_shape_should_be_conserved = (
              testing.FeatureExpectationItem(
                  value=img_shaped,
                  expected=img_shaped,
                  expected_np=img_shaped,
              )
          )
          img_shape_should_be_static = testing.FeatureExpectationItem(
              value=randint(256, size=(31, 64, 1), dtype=np.uint8),
              raise_cls=ValueError,
              raise_cls_np=ValueError,
              raise_msg="are incompatible",
          )
          self.assertFeature(
              feature=features_lib.Image(
                  shape=(32, 64, 1),
                  encoding_format="png",
                  use_colormap=True,
              ),
              shape=(32, 64, 1),
              dtype=np.uint8,
              tests=[
                  img_shape_should_be_conserved,
                  img_shape_should_be_static,
              ],
              test_attributes=dict(
                  _encoding_format="png",
                  _use_colormap=True,
              ),
          )
  
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 3 for calling the ImageFeatureTest obj's underlying member method code with example usage: obj.test_image_with_statically_defined_shape(make_lib_fail) without return types