class_docstr: Mixin that contain utilities for preparing image features.
class_docstr_tok: ["Mixin","that","contain","utilities","for","preparing","image","features","."]
code: def _ensure_format_supported(self, image):
      if not isinstance(
          image, (PIL.Image.Image, np.ndarray)
      ) and not is_torch_tensor(image):
          raise ValueError(
              f"Got type {type(image)} which is not supported, only `PIL.Image.Image`, `np.array` and "
              "`torch.Tensor` are."
          )
  
imports: import os
  from typing import TYPE_CHECKING, List, Tuple, Union
  import numpy
  from packaging import version
  import requests
  from .utils import ExplicitEnum, is_jax_tensor, is_tf_tensor, is_torch_available, is_torch_tensor, is_vision_available, to_numpy
  from .utils.constants import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD, IMAGENET_STANDARD_MEAN, IMAGENET_STANDARD_STD
label_desc: Use image node_id 1 for calling the ImageFeatureExtractionMixin obj's underlying member method code with example usage: obj._ensure_format_supported(image) without return types