code: def test_small_model_pt_no_panoptic(self):
      model_id = "hf-internal-testing/tiny-random-mobilevit"
      # The default task is `image-classification` we need to override
      pipe = pipeline(task="image-segmentation", model=model_id)
  
      # This model does NOT support neither `instance` nor  `panoptic`
      # We should error out
      with self.assertRaises(ValueError) as e:
          pipe(
              "http://images.cocodataset.org/val2017/000000039769.jpg",
              subtask="panoptic",
          )
      self.assertEqual(
          str(e.exception),
          "Subtask panoptic is not supported for model <class"
          " 'transformers.models.mobilevit.modeling_mobilevit.MobileViTForSemanticSegmentation'>",
      )
      with self.assertRaises(ValueError) as e:
          pipe(
              "http://images.cocodataset.org/val2017/000000039769.jpg",
              subtask="instance",
          )
      self.assertEqual(
          str(e.exception),
          "Subtask instance is not supported for model <class"
          " 'transformers.models.mobilevit.modeling_mobilevit.MobileViTForSemanticSegmentation'>",
      )
  
imports: import hashlib
  import unittest
  from typing import Dict
  import datasets
  import numpy
  from datasets import load_dataset
  from transformers import MODEL_FOR_IMAGE_SEGMENTATION_MAPPING, MODEL_FOR_INSTANCE_SEGMENTATION_MAPPING, MODEL_FOR_SEMANTIC_SEGMENTATION_MAPPING, AutoFeatureExtractor, AutoModelForImageSegmentation, AutoModelForInstanceSegmentation, DetrForSegmentation, ImageSegmentationPipeline, MaskFormerForInstanceSegmentation, is_vision_available, pipeline
  from transformers.testing_utils import nested_simplify, require_tf, require_timm, require_torch, require_vision, slow
  from .test_pipelines_common import ANY, PipelineTestCaseMeta
label_desc: Use image node_id 4 for calling the ImageSegmentationPipelineTests obj's underlying member method code with example usage: obj.test_small_model_pt_no_panoptic() without return types