class_docstr: Randomly adjust the intensity of input images by calculating a randomized smooth field for each invocation.
  
  This uses SmoothField internally to define the adjustment over the image. If `pad` is greater than 0 the
  edges of the input volume of that width will be mostly unchanged. Intensity is changed by multiplying the
  inputs by the smooth field, so the values of `gamma` should be chosen with this in mind. The default values
  of `(0.1, 1.0)` are sensible in that values will not be zeroed out by the field nor multiplied greater than
  the original value range.
  
  Args:
      spatial_size: size of input array
      rand_size: size of the randomized field to start from
      pad: number of pixels/voxels along the edges of the field to pad with 1
      mode: interpolation mode to use when upsampling
      align_corners: if True align the corners when upsampling field
      prob: probability transform is applied
      gamma: (min, max) range of intensity multipliers
      device: Pytorch device to define field on
class_docstr_tok: ["Randomly","adjust","the","intensity","of","input","images","by","calculating","a","randomized","smooth","field","for","each","invocation",".","This","uses","SmoothField","internally","to","define","the","adjustment","over","the","image",".","If","`","pad","`","is","greater","than","0","the","edges","of","the","input","volume","of","that","width","will","be","mostly","unchanged",".","Intensity","is","changed","by","multiplying","the","inputs","by","the","smooth","field",",","so","the","values","of","`","gamma","`","should","be","chosen","with","this","in","mind",".","The","default","values","of","`","(","0.1",",","1.0",")","`","are","sensible","in","that","values","will","not","be","zeroed","out","by","the","field","nor","multiplied","greater","than","the","original","value","range",".","Args",":","spatial_size",":","size","of","input","array","rand_size",":","size","of","the","randomized","field","to","start","from","pad",":","number","of","pixels\/voxels","along","the","edges","of","the","field","to","pad","with","1","mode",":","interpolation","mode","to","use","when","upsampling","align_corners",":","if","True","align","the","corners","when","upsampling","field","prob",":","probability","transform","is","applied","gamma",":","(","min",",","max",")","range","of","intensity","multipliers","device",":","Pytorch","device","to","define","field","on"]
docstr: Apply the transform to `img`, if `randomize` randomizing the smooth field otherwise reusing the previous.
code: def __call__(
      self, img: NdarrayOrTensor, randomize: bool = True
  ) -> NdarrayOrTensor:
      """
      Apply the transform to `img`, if `randomize` randomizing the smooth field otherwise reusing the previous.
      """
      img = convert_to_tensor(img, track_meta=get_track_meta())
  
      if randomize:
          self.randomize()
  
      if not self._do_transform:
          return img
  
      field = self.sfield()
      rfield, *_ = convert_to_dst_type(field, img)
  
      # everything below here is to be computed using the destination type (numpy, tensor, etc.)
  
      out = img * rfield
  
      return out
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  from typing import Any
  import numpy
  import torch
  from torch.nn.functional import grid_sample, interpolate
  from monai.config.type_definitions import NdarrayOrTensor
  from monai.data.meta_obj import get_track_meta
  from monai.networks.utils import meshgrid_ij
  from monai.transforms.transform import Randomizable, RandomizableTransform
  from monai.transforms.utils_pytorch_numpy_unification import moveaxis
  from monai.utils import GridSampleMode, GridSamplePadMode, InterpolateMode
  from monai.utils.enums import TransformBackends
  from monai.utils.module import look_up_option
  from monai.utils.type_conversion import convert_to_dst_type, convert_to_tensor
label_desc: Use image node_id 5 for calling the RandSmoothFieldAdjustIntensity obj's underlying member method code with example usage: obj.__call__(img, randomize) and returns: out, img