code: def test_inference_image_classification_head(self):
      model = TFMobileViTForImageClassification.from_pretrained(
          "apple/mobilevit-xx-small"
      )
  
      feature_extractor = MobileViTFeatureExtractor.from_pretrained(
          "apple/mobilevit-xx-small"
      )
      image = prepare_img()
      inputs = feature_extractor(images=image, return_tensors="tf")
  
      # forward pass
      outputs = model(**inputs, training=False)
  
      # verify the logits
      expected_shape = tf.TensorShape((1, 1000))
      self.assertEqual(outputs.logits.shape, expected_shape)
  
      expected_slice = tf.constant([-1.9364, -1.2327, -0.4653])
  
      tf.debugging.assert_near(
          outputs.logits[0, :3], expected_slice, atol=1e-4, rtol=1e-04
      )
  
imports: import inspect
  import unittest
  from transformers import MobileViTConfig
  from transformers.file_utils import is_tf_available, is_vision_available
  from transformers.testing_utils import require_tf, slow
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_tf_common import TFModelTesterMixin, floats_tensor, ids_tensor
label_desc: Use image node_id 1 for calling the TFMobileViTModelIntegrationTest obj's underlying member method code with example usage: obj.test_inference_image_classification_head() without return types