class_docstr: ``SomeOf`` samples a different sequence of transforms to apply each time it is called.
  
  It can be configured to sample a fixed or varying number of transforms each time its called. Samples are drawn
  uniformly, or from user supplied transform weights. When varying the number of transforms sampled per call,
  the number of transforms to sample that call is sampled uniformly from a range supplied by the user.
  
  Args:
      transforms: list of callables.
      map_items: whether to apply transform to each item in the input `data` if `data` is a list or tuple.
          Defaults to `True`.
      unpack_items: whether to unpack input `data` with `*` as parameters for the callable function of transform.
          Defaults to `False`.
      log_stats: this optional parameter allows you to specify a logger by name for logging of pipeline execution.
          Setting this to False disables logging. Setting it to True enables logging to the default loggers.
          Setting a string overrides the logger name to which logging is performed.
      num_transforms: a 2-tuple, int, or None. The 2-tuple specifies the minimum and maximum (inclusive) number of
          transforms to sample at each iteration. If an int is given, the lower and upper bounds are set equal.
          None sets it to `len(transforms)`. Default to `None`.
      replace: whether to sample with replacement. Defaults to `False`.
      weights: weights to use in for sampling transforms. Will be normalized to 1. Default: None (uniform).
      lazy: whether to enable :ref:`Lazy Resampling<lazy_resampling>` for lazy transforms. If False, transforms will
          be carried out on a transform by transform basis. If True, all lazy transforms will be executed by
          accumulating changes and resampling as few times as possible. If lazy is None, `Compose` will
          perform lazy execution on lazy transforms that have their `lazy` property set to True.
      overrides: this optional parameter allows you to specify a dictionary of parameters that should be overridden
          when executing a pipeline. These each parameter that is compatible with a given transform is then applied
          to that transform before it is executed. Note that overrides are currently only applied when
          :ref:`Lazy Resampling<lazy_resampling>` is enabled for the pipeline or a given transform. If lazy is False
          they are ignored. Currently supported args are:
          {``"mode"``, ``"padding_mode"``, ``"dtype"``, ``"align_corners"``, ``"resample_mode"``, ``device``}.
class_docstr_tok: ["``","SomeOf","``","samples","a","different","sequence","of","transforms","to","apply","each","time","it","is","called",".","It","can","be","configured","to","sample","a","fixed","or","varying","number","of","transforms","each","time","its","called",".","Samples","are","drawn","uniformly",",","or","from","user","supplied","transform","weights",".","When","varying","the","number","of","transforms","sampled","per","call",",","the","number","of","transforms","to","sample","that","call","is","sampled","uniformly","from","a","range","supplied","by","the","user",".","Args",":","transforms",":","list","of","callables",".","map_items",":","whether","to","apply","transform","to","each","item","in","the","input","`","data","`","if","`","data","`","is","a","list","or","tuple",".","Defaults","to","`","True","`",".","unpack_items",":","whether","to","unpack","input","`","data","`","with","`","*","`","as","parameters","for","the","callable","function","of","transform",".","Defaults","to","`","False","`",".","log_stats",":","this","optional","parameter","allows","you","to","specify","a","logger","by","name","for","logging","of","pipeline","execution",".","Setting","this","to","False","disables","logging",".","Setting","it","to","True","enables","logging","to","the","default","loggers",".","Setting","a","string","overrides","the","logger","name","to","which","logging","is","performed",".","num_transforms",":","a","2-tuple",",","int",",","or","None",".","The","2-tuple","specifies","the","minimum","and","maximum","(","inclusive",")","number","of","transforms","to","sample","at","each","iteration",".","If","an","int","is","given",",","the","lower","and","upper","bounds","are","set","equal",".","None","sets","it","to","`","len","(","transforms",")","`",".","Default","to","`","None","`",".","replace",":","whether","to","sample","with","replacement",".","Defaults","to","`","False","`",".","weights",":","weights","to","use","in","for","sampling","transforms",".","Will","be","normalized","to","1",".","Default",":","None","(","uniform",")",".","lazy",":","whether","to","enable",":","ref",":","`","Lazy","Resampling","<","lazy_resampling",">","`","for","lazy","transforms",".","If","False",",","transforms","will","be","carried","out","on","a","transform","by","transform","basis",".","If","True",",","all","lazy","transforms","will","be","executed","by","accumulating","changes","and","resampling","as","few","times","as","possible",".","If","lazy","is","None",",","`","Compose","`","will","perform","lazy","execution","on","lazy","transforms","that","have","their","`","lazy","`","property","set","to","True",".","overrides",":","this","optional","parameter","allows","you","to","specify","a","dictionary","of","parameters","that","should","be","overridden","when","executing","a","pipeline",".","These","each","parameter","that","is","compatible","with","a","given","transform","is","then","applied","to","that","transform","before","it","is","executed",".","Note","that","overrides","are","currently","only","applied","when",":","ref",":","`","Lazy","Resampling","<","lazy_resampling",">","`","is","enabled","for","the","pipeline","or","a","given","transform",".","If","lazy","is","False","they","are","ignored",".","Currently","supported","args","are",":","{","``","``","mode","''","``",",","``","``","padding_mode","''","``",",","``","``","dtype","''","``",",","``","``","align_corners","''","``",",","``","``","resample_mode","''","``",",","``","device","``","}","."]
code: def __call__(
      self,
      data,
      start=0,
      end=None,
      threading=False,
      lazy: bool | None = None,
  ):
      if start != 0:
          raise ValueError(
              f"SomeOf requires 'start' parameter to be 0 (start set to {start})"
          )
      if end is not None:
          raise ValueError(
              f"SomeOf requires 'end' parameter to be None (end set to {end}"
          )
  
      if len(self.transforms) == 0:
          return data
  
      sample_size = self.R.randint(
          self.min_num_transforms, self.max_num_transforms + 1
      )
      applied_order = self.R.choice(
          len(self.transforms),
          sample_size,
          replace=self.replace,
          p=self.weights,
      ).tolist()
      _lazy = self._lazy if lazy is None else lazy
  
      data = execute_compose(
          data,
          [self.transforms[a] for a in applied_order],
          start=start,
          end=end,
          map_items=self.map_items,
          unpack_items=self.unpack_items,
          lazy=_lazy,
          overrides=self.overrides,
          threading=threading,
          log_stats=self.log_stats,
      )
      if isinstance(data, monai.data.MetaTensor):
          self.push_transform(
              data, extra_info={"applied_order": applied_order}
          )
      elif isinstance(data, Mapping):
          for (
              key
          ) in data:  # dictionary not change size during iteration
              if (
                  isinstance(data[key], monai.data.MetaTensor)
                  or self.trace_key(key) in data
              ):
                  self.push_transform(
                      data,
                      key,
                      extra_info={"applied_order": applied_order},
                  )
  
      return data
  
imports: from __future__ import annotations
  import warnings
  from collections.abc import Callable, Mapping, Sequence
  from copy import deepcopy
  from typing import Any
  import numpy
  import monai
  from monai.apps.utils import get_logger
  from monai.config import NdarrayOrTensor
  from monai.transforms.inverse import InvertibleTransform
  from monai.transforms.lazy.functional import apply_pending_transforms
  from monai.transforms.traits import ThreadUnsafe
  from monai.transforms.transform import LazyTransform, MapTransform, Randomizable, RandomizableTransform, Transform, apply_transform
  from monai.utils import MAX_SEED, TraceKeys, TraceStatusKeys, ensure_tuple, get_seed
label_desc: Use image node_id 4 for calling the SomeOf obj's underlying member method code with example usage: obj.__call__(data, start, end, threading, lazy) and returns: data, data