code: def get_nr_patches(
      patch_size: Union[int, Sequence[int]],
      shape: Tuple[int, ...],
      overlap: bool = False,
  ) -> int:
      """
      Get number of patches for given shape.
  
      Parameters
      ----------
          patch_size: int, sequence
              One- or multidimensional patch size.
          shape (shape: Tuple[int, ...]): The image shape.
          overlap: boolean
              Indicates whether overlapping patches is used or not.
  
      Returns
      -------
      integer
          Number of patches that fit into the image.
      """
  
      if isinstance(patch_size, int):
          patch_size = (patch_size,)
      patch_size = np.array(patch_size)
  
      assert isinstance(patch_size, np.ndarray)
      if len(patch_size) == 1 and len(shape) != 1:
          patch_size = tuple(patch_size for _ in shape)
      elif patch_size.ndim != 1:
          raise ValueError(
              "patch_size has to be either a scalar or a 1D-sequence"
          )
      elif len(patch_size) != len(shape):
          raise ValueError(
              "patch_size sequence length does not match shape length"
              f" (len(patch_size) != len(shape))"
          )
      patch_size = tuple(patch_size)
  
      return np.prod(shape) // np.prod(patch_size)
  
imports: import copy
  import re
  from importlib import util
  from typing import Any, Dict, Optional, Sequence, Tuple, Union, List, TypeVar
  import numpy
  from skimage.segmentation import slic, felzenszwalb
  from quantus.helpers import asserts
  from quantus.helpers.model.model_interface import ModelInterface
label_desc: Use image node_id 13 for calling a global function with example usage: get_nr_patches(patch_size, shape, overlap) and returns: unknown