class_docstr: Extracts patches from a collection of images
  
  Read more in the :ref:`User Guide <image_feature_extraction>`.
  
  Parameters
  ----------
  patch_size : tuple of ints (patch_height, patch_width)
      the dimensions of one patch
  
  max_patches : integer or float, optional default is None
      The maximum number of patches per image to extract. If max_patches is a
      float in (0, 1), it is taken to mean a proportion of the total number
      of patches.
  
  random_state : int or RandomState
      Pseudo number generator state used for random sampling.
code: def __init__(
      self, patch_size=None, max_patches=None, random_state=None
  ):
      self.patch_size = patch_size
      self.max_patches = max_patches
      self.random_state = random_state
  
imports: from itertools import product
  import numbers
  import numpy
  from scipy import sparse
  from numpy.lib.stride_tricks import as_strided
  from ..utils import check_array, check_random_state
  from ..utils.fixes import astype
  from ..base import BaseEstimator
label_desc: Use image node_id 1 to create a new PatchExtractor object from inherited base classes: BaseEstimator with example: obj = PatchExtractor(patch_size, max_patches, random_state)