class_docstr: Ignite process_function used to introduce interactions (simulation of clicks) for Deepgrow Training/Evaluation.
  For more details please refer to: https://pytorch.org/ignite/generated/ignite.engine.engine.Engine.html.
  This implementation is based on:
  
      Sakinis et al., Interactive segmentation of medical images through
      fully convolutional neural networks. (2019) https://arxiv.org/abs/1903.08205
  
  Args:
      transforms: execute additional transformation during every iteration (before train).
          Typically, several Tensor based transforms composed by `Compose`.
      max_interactions: maximum number of interactions per iteration
      train: training or evaluation
      key_probability: field name to fill probability for every interaction
class_docstr_tok: ["Ignite","process_function","used","to","introduce","interactions","(","simulation","of","clicks",")","for","Deepgrow","Training\/Evaluation",".","For","more","details","please","refer","to",":","https",":","\/\/pytorch.org\/ignite\/generated\/ignite.engine.engine.Engine.html",".","This","implementation","is","based","on",":","Sakinis","et","al.",",","Interactive","segmentation","of","medical","images","through","fully","convolutional","neural","networks",".","(","2019",")","https",":","\/\/arxiv.org\/abs\/1903.08205","Args",":","transforms",":","execute","additional","transformation","during","every","iteration","(","before","train",")",".","Typically",",","several","Tensor","based","transforms","composed","by","`","Compose","`",".","max_interactions",":","maximum","number","of","interactions","per","iteration","train",":","training","or","evaluation","key_probability",":","field","name","to","fill","probability","for","every","interaction"]
code: def __init__(
      self,
      transforms: Sequence[Callable] | Callable,
      max_interactions: int,
      train: bool,
      key_probability: str = "probability",
  ) -> None:
      if not isinstance(transforms, Compose):
          transforms = Compose(transforms)
  
      self.transforms: Compose = transforms
      self.max_interactions = max_interactions
      self.train = train
      self.key_probability = key_probability
  
file_path: MONAI/monai/apps/deepgrow/interaction.py
imports: from __future__ import annotations
  from collections.abc import Callable, Sequence
  import torch
  from monai.data import decollate_batch, list_data_collate
  from monai.engines import SupervisedEvaluator, SupervisedTrainer
  from monai.engines.utils import IterationEvents
  from monai.transforms import Compose
  from monai.utils.enums import CommonKeys
label_desc: Use image node_id 1 to create a new Interaction object  with example: obj = Interaction(transforms, max_interactions, train, key_probability)