code: def test_small_model_tf(self):
      image_classifier = pipeline(
          model="hf-internal-testing/tiny-random-clip-zero-shot-image-classification",
          framework="tf",
      )
      image = Image.open(
          "./tests/fixtures/tests_samples/COCO/000000039769.png"
      )
      output = image_classifier(image, candidate_labels=["a", "b", "c"])
  
      self.assertEqual(
          nested_simplify(output),
          [
              {"score": 0.333, "label": "a"},
              {"score": 0.333, "label": "b"},
              {"score": 0.333, "label": "c"},
          ],
      )
  
      output = image_classifier(
          [image] * 5, candidate_labels=["A", "B", "C"], batch_size=2
      )
      self.assertEqual(
          nested_simplify(output),
          # Pipeline outputs are supposed to be deterministic and
          # So we could in theory have real values "A", "B", "C" instead
          # of ANY(str).
          # However it seems that in this particular case, the floating
          # scores are so close, we enter floating error approximation
          # and the order is not guaranteed anymore with batching.
          [
              [
                  {"score": 0.333, "label": ANY(str)},
                  {"score": 0.333, "label": ANY(str)},
                  {"score": 0.333, "label": ANY(str)},
              ],
              [
                  {"score": 0.333, "label": ANY(str)},
                  {"score": 0.333, "label": ANY(str)},
                  {"score": 0.333, "label": ANY(str)},
              ],
              [
                  {"score": 0.333, "label": ANY(str)},
                  {"score": 0.333, "label": ANY(str)},
                  {"score": 0.333, "label": ANY(str)},
              ],
              [
                  {"score": 0.333, "label": ANY(str)},
                  {"score": 0.333, "label": ANY(str)},
                  {"score": 0.333, "label": ANY(str)},
              ],
              [
                  {"score": 0.333, "label": ANY(str)},
                  {"score": 0.333, "label": ANY(str)},
                  {"score": 0.333, "label": ANY(str)},
              ],
          ],
      )
  
file_path: transformers/tests/pipelines/test_pipelines_zero_shot_image_classification.py
imports: import unittest
  from transformers import is_vision_available
  from transformers.pipelines import pipeline
  from transformers.testing_utils import is_pipeline_test, nested_simplify, require_tf, require_torch, require_vision, slow
  from .test_pipelines_common import ANY
label_desc: Use image node_id 2 for calling the ZeroShotImageClassificationPipelineTests obj's underlying member method code with example usage: obj.test_small_model_tf() without return types