class_docstr: Ignite process_function used to introduce interactions (simulation of clicks) for DeepEdit Training/Evaluation.
  
  More details about this can be found at:
  
      Diaz-Pinto et al., MONAI Label: A framework for AI-assisted Interactive
      Labeling of 3D Medical Images. (2022) https://arxiv.org/abs/2203.12362
  
  Args:
      deepgrow_probability: probability of simulating clicks in an iteration
      transforms: execute additional transformation during every iteration (before train).
          Typically, several Tensor based transforms composed by `Compose`.
      train: True for training mode or False for evaluation mode
      click_probability_key: key to click/interaction probability
      max_interactions: maximum number of interactions per iteration
class_docstr_tok: ["Ignite","process_function","used","to","introduce","interactions","(","simulation","of","clicks",")","for","DeepEdit","Training\/Evaluation",".","More","details","about","this","can","be","found","at",":","Diaz-Pinto","et","al.",",","MONAI","Label",":","A","framework","for","AI-assisted","Interactive","Labeling","of","3D","Medical","Images",".","(","2022",")","https",":","\/\/arxiv.org\/abs\/2203.12362","Args",":","deepgrow_probability",":","probability","of","simulating","clicks","in","an","iteration","transforms",":","execute","additional","transformation","during","every","iteration","(","before","train",")",".","Typically",",","several","Tensor","based","transforms","composed","by","`","Compose","`",".","train",":","True","for","training","mode","or","False","for","evaluation","mode","click_probability_key",":","key","to","click\/interaction","probability","max_interactions",":","maximum","number","of","interactions","per","iteration"]
code: def __init__(
      self,
      deepgrow_probability: float,
      transforms: Union[Sequence[Callable], Callable],
      train: bool,
      click_probability_key: str = "probability",
      max_interactions: int = 1,
  ) -> None:
      self.deepgrow_probability = deepgrow_probability
      self.transforms = (
          Compose(transforms)
          if not isinstance(transforms, Compose)
          else transforms
      )
      self.train = train
      self.click_probability_key = click_probability_key
      self.max_interactions = max_interactions
  
file_path: MONAILabel/monailabel/deepedit/interaction.py
imports: from typing import Callable, Dict, Sequence, Union
  import numpy
  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(deepgrow_probability, transforms, train, click_probability_key, max_interactions)