class_docstr: Process and show the image batch and its associated label using matplotlib.
code: def _show_images_and_labels(
      self,
      data: List[Any],
      num_samples: int,
      title: str,
      limit_nb_samples: int = None,
      figsize: Tuple[int, int] = (6.4, 4.8),
  ):
      num_samples = max(1, min(num_samples, limit_nb_samples))
  
      # define the image grid
      cols: int = min(num_samples, self.max_cols)
      rows: int = num_samples // cols
  
      # create figure and set title
      fig, axs = plt.subplots(rows, cols, figsize=figsize)
      fig.suptitle(title)
  
      if not isinstance(axs, np.ndarray):
          axs = np.array(axs)
      axs = axs.flatten()
  
      for i, ax in enumerate(axs):
          # unpack images and labels
          if isinstance(data, list):
              _img, _label = data[i][DataKeys.INPUT], data[i].get(
                  DataKeys.TARGET, ""
              )
          elif isinstance(data, dict):
              _img, _label = (
                  data[DataKeys.INPUT][i],
                  data.get(DataKeys.TARGET, [""] * (i + 1))[i],
              )
          else:
              raise TypeError(f"Unknown data type. Got: {type(data)}.")
          # convert images to numpy
          _img: np.ndarray = self._to_numpy(_img)
          if isinstance(_label, Tensor):
              _label = _label.squeeze().tolist()
          # show image and set label as subplot title
          ax.imshow(_img)
          ax.set_title(str(_label))
          ax.axis("off")
      plt.show(block=self.block_viz_window)
  
imports: from typing import Any, Callable, Collection, Dict, List, Optional, Sequence, Tuple, Type, Union
  import numpy
  import pandas
  from torch import Tensor
  from torch.utils.data import Dataset
  from flash.core.data.base_viz import BaseVisualization
  from flash.core.data.callback import BaseDataFetcher
  from flash.core.data.data_module import DataModule, DatasetInput
  from flash.core.data.io.input import DataKeys, Input
  from flash.core.data.io.input_transform import INPUT_TRANSFORM_TYPE
  from flash.core.data.utilities.classification import TargetFormatter
  from flash.core.data.utilities.paths import PATH_TYPE
  from flash.core.integrations.labelstudio.input import LabelStudioImageClassificationInput, _parse_labelstudio_arguments
  from flash.core.utilities.imports import _FIFTYONE_AVAILABLE, _MATPLOTLIB_AVAILABLE, _TOPIC_IMAGE_AVAILABLE, Image, requires
  from flash.core.utilities.stages import RunningStage
  from flash.image.classification.input import ImageClassificationCSVInput, ImageClassificationDataFrameInput, ImageClassificationFiftyOneInput, ImageClassificationFilesInput, ImageClassificationFolderInput, ImageClassificationImageInput, ImageClassificationNumpyInput, ImageClassificationTensorInput
  from flash.image.classification.input_transform import ImageClassificationInputTransform
label_desc: Use image node_id 2 for calling the MatplotlibVisualization obj's underlying member method code with example usage: obj._show_images_and_labels(data, num_samples, title, limit_nb_samples, figsize) without return types