code: def _error_on_missing_matplotlib() -> None:
      """Raise error if matplotlib is not installed."""
      if not _MATPLOTLIB_AVAILABLE:
          raise ModuleNotFoundError(
              "Plot function expects `matplotlib` to be installed. Please install with `pip install matplotlib`"
          )
  
file_path: torchmetrics/src/torchmetrics/utilities/plot.py
imports: from itertools import product
  from math import ceil, floor, sqrt
  from typing import Any, Dict, Generator, List, Optional, Sequence, Tuple, Union, no_type_check
  import numpy
  import torch
  from torch import Tensor
  from torchmetrics.utilities.imports import _LATEX_AVAILABLE, _MATPLOTLIB_AVAILABLE, _SCIENCEPLOT_AVAILABLE
label_desc: Use image node_id 1 for calling a global function with example usage: _error_on_missing_matplotlib() without return types