class_docstr: Dictionary-based wrapper of :py:class:`monai.data.PatchIter`.
  Return a patch generator for dictionary data and the coordinate, Typically used
  with :py:class:`monai.data.GridPatchDataset`.
  Suppose all the expected fields specified by `keys` have same shape.
  
  Args:
      keys: keys of the corresponding items to iterate patches.
      patch_size: size of patches to generate slices for, 0/None selects whole dimension
      start_pos: starting position in the array, default is 0 for each dimension
      mode: available modes: (Numpy) {``"constant"``, ``"edge"``, ``"linear_ramp"``, ``"maximum"``,
          ``"mean"``, ``"median"``, ``"minimum"``, ``"reflect"``, ``"symmetric"``, ``"wrap"``, ``"empty"``}
          (PyTorch) {``"constant"``, ``"reflect"``, ``"replicate"``, ``"circular"``}.
          One of the listed string values or a user supplied function.
          If None, no wrapping is performed. Defaults to ``"wrap"``.
          See also: https://numpy.org/doc/stable/reference/generated/numpy.pad.html
          https://pytorch.org/docs/stable/generated/torch.nn.functional.pad.html
          requires pytorch >= 1.10 for best compatibility.
      pad_opts: other arguments for the `np.pad` function.
          note that `np.pad` treats channel dimension as the first dimension.
class_docstr_tok: ["Dictionary-based","wrapper","of",":","py",":","class",":","`","monai.data.PatchIter","`",".","Return","a","patch","generator","for","dictionary","data","and","the","coordinate",",","Typically","used","with",":","py",":","class",":","`","monai.data.GridPatchDataset","`",".","Suppose","all","the","expected","fields","specified","by","`","keys","`","have","same","shape",".","Args",":","keys",":","keys","of","the","corresponding","items","to","iterate","patches",".","patch_size",":","size","of","patches","to","generate","slices","for",",","0\/None","selects","whole","dimension","start_pos",":","starting","position","in","the","array",",","default","is","0","for","each","dimension","mode",":","available","modes",":","(","Numpy",")","{","``","``","constant","''","``",",","``","``","edge","''","``",",","``","``","linear_ramp","''","``",",","``","``","maximum","''","``",",","``","``","mean","''","``",",","``","``","median","''","``",",","``","``","minimum","''","``",",","``","``","reflect","''","``",",","``","``","symmetric","''","``",",","``","``","wrap","''","``",",","``","``","empty","''","``","}","(","PyTorch",")","{","``","``","constant","''","``",",","``","``","reflect","''","``",",","``","``","replicate","''","``",",","``","``","circular","''","``","}",".","One","of","the","listed","string","values","or","a","user","supplied","function",".","If","None",",","no","wrapping","is","performed",".","Defaults","to","``","``","wrap","''","``",".","See","also",":","https",":","\/\/numpy.org\/doc\/stable\/reference\/generated\/numpy.pad.html","https",":","\/\/pytorch.org\/docs\/stable\/generated\/torch.nn.functional.pad.html","requires","pytorch",">","=","1.10","for","best","compatibility",".","pad_opts",":","other","arguments","for","the","`","np.pad","`","function",".","note","that","`","np.pad","`","treats","channel","dimension","as","the","first","dimension","."]
code: def __init__(
      self,
      keys: KeysCollection,
      patch_size: Sequence[int],
      start_pos: Sequence[int] = (),
      mode: str | None = NumpyPadMode.WRAP,
      **pad_opts,
  ):
      self.keys = ensure_tuple(keys)
      self.patch_iter = PatchIter(
          patch_size=patch_size,
          start_pos=start_pos,
          mode=mode,
          **pad_opts,
      )
  
imports: from __future__ import annotations
  import sys
  import warnings
  from collections.abc import Callable, Generator, Hashable, Iterable, Iterator, Mapping, Sequence
  from copy import deepcopy
  from multiprocessing.managers import ListProxy
  from multiprocessing.pool import ThreadPool
  from typing import TYPE_CHECKING
  import numpy
  import torch
  from monai.config import KeysCollection
  from monai.config.type_definitions import NdarrayTensor
  from monai.data.iterable_dataset import IterableDataset
  from monai.data.utils import iter_patch, pickle_hashing
  from monai.transforms import Compose, RandomizableTrait, Transform, apply_transform, convert_to_contiguous
  from monai.utils import NumpyPadMode, ensure_tuple, first, min_version, optional_import
label_desc: Use image node_id 1 to create a new PatchIterd object  with example: obj = PatchIterd(keys, patch_size, start_pos, mode)