class_docstr: Get parameters for ```3d affine``` transformation random affine transform.
  
  Args:
      degrees: Range of yaw (x-axis), pitch (y-axis), roll (z-axis) to select from.
          If degrees is a number, then yaw, pitch, roll will be generated from the range of (-degrees, +degrees).
          If degrees is a tuple of (min, max), then yaw, pitch, roll will be generated from the range of (min, max).
          If degrees is a list of floats [a, b, c], then yaw, pitch, roll will be generated from (-a, a), (-b, b)
          and (-c, c).
          If degrees is a list of tuple ((a, b), (m, n), (x, y)), then yaw, pitch, roll will be generated from
          (a, b), (m, n) and (x, y).
          Set to 0 to deactivate rotations.
      translate: tuple of maximum absolute fraction for horizontal, vertical and
          depthical translations (dx,dy,dz). For example translate=(a, b, c), then
          horizontal shift will be randomly sampled in the range -img_width * a < dx < img_width * a
          vertical shift will be randomly sampled in the range -img_height * b < dy < img_height * b.
          depthical shift will be randomly sampled in the range -img_depth * c < dz < img_depth * c.
          Will not translate by default.
      scale: scaling factor interval.
          If (a, b) represents isotropic scaling, the scale is randomly sampled from the range a <= scale <= b.
          If ((a, b), (c, d), (e, f)), the scale is randomly sampled from the range a <= scale_x <= b,
          c <= scale_y <= d, e <= scale_z <= f. Will keep original scale by default.
      shears: Range of degrees to select from.
          If shear is a number, a shear to the 6 facets in the range (-shear, +shear) will be applied.
          If shear is a tuple of 2 values, a shear to the 6 facets in the range (shear[0], shear[1]) will be applied.
          If shear is a tuple of 6 values, a shear to the i-th facet in the range (-shear[i], shear[i])
          will be applied.
          If shear is a tuple of 6 tuples, a shear to the i-th facet in the range (-shear[i, 0], shear[i, 1])
          will be applied.
  
  Returns:
      A dict of parameters to be passed for transformation.
          - translations (torch.Tensor): element-wise translations with a shape of (B, 3).
          - center (torch.Tensor): element-wise center with a shape of (B, 3).
          - scale (torch.Tensor): element-wise scales with a shape of (B, 3).
          - angle (torch.Tensor): element-wise rotation angles with a shape of (B, 3).
          - sxy (torch.Tensor): element-wise x-y-facet shears with a shape of (B,).
          - sxz (torch.Tensor): element-wise x-z-facet shears with a shape of (B,).
          - syx (torch.Tensor): element-wise y-x-facet shears with a shape of (B,).
          - syz (torch.Tensor): element-wise y-z-facet shears with a shape of (B,).
          - szx (torch.Tensor): element-wise z-x-facet shears with a shape of (B,).
          - szy (torch.Tensor): element-wise z-y-facet shears with a shape of (B,).
  
  Note:
      The generated random numbers are not reproducible across different devices and dtypes. By default,
      the parameters will be generated on CPU in float32. This can be changed by calling
      ``self.set_rng_device_and_dtype(device="cuda", dtype=torch.float64)``.
code: def make_samplers(
      self, device: torch.device, dtype: torch.dtype
  ) -> None:
      degrees = _tuple_range_reader(self.degrees, 3, device, dtype)
      shear: Optional[torch.Tensor] = None
      if self.shears is not None:
          shear = _tuple_range_reader(self.shears, 6, device, dtype)
          self.sxy_sampler = UniformDistribution(
              shear[0, 0], shear[0, 1], validate_args=False
          )
          self.sxz_sampler = UniformDistribution(
              shear[1, 0], shear[1, 1], validate_args=False
          )
          self.syx_sampler = UniformDistribution(
              shear[2, 0], shear[2, 1], validate_args=False
          )
          self.syz_sampler = UniformDistribution(
              shear[3, 0], shear[3, 1], validate_args=False
          )
          self.szx_sampler = UniformDistribution(
              shear[4, 0], shear[4, 1], validate_args=False
          )
          self.szy_sampler = UniformDistribution(
              shear[5, 0], shear[5, 1], validate_args=False
          )
  
      # check translation range
      self._translate: Optional[torch.Tensor] = None
      if self.translate is not None:
          self._translate = torch.as_tensor(
              self.translate, device=device, dtype=dtype
          )
          _singular_range_check(
              self._translate, "translate", bounds=(0, 1), mode="3d"
          )
  
      # check scale range
      self._scale: Optional[torch.Tensor] = None
      if self.scale is not None:
          _scale = torch.as_tensor(
              self.scale, device=device, dtype=dtype
          )
          if _scale.shape == torch.Size([2]):
              self._scale = _scale.unsqueeze(0).repeat(3, 1)
          elif _scale.shape != torch.Size([3, 2]):
              raise ValueError(
                  f"'scale' shall be either shape (2) or (3, 2). Got {self.scale}."
              )
          else:
              self._scale = _scale
          _singular_range_check(
              self._scale[0],
              "scale-x",
              bounds=(0, float("inf")),
              mode="2d",
          )
          _singular_range_check(
              self._scale[1],
              "scale-y",
              bounds=(0, float("inf")),
              mode="2d",
          )
          _singular_range_check(
              self._scale[2],
              "scale-z",
              bounds=(0, float("inf")),
              mode="2d",
          )
          self.scale_1_sampler = UniformDistribution(
              self._scale[0, 0], self._scale[0, 1], validate_args=False
          )
          self.scale_2_sampler = UniformDistribution(
              self._scale[1, 0], self._scale[1, 1], validate_args=False
          )
          self.scale_3_sampler = UniformDistribution(
              self._scale[2, 0], self._scale[2, 1], validate_args=False
          )
  
      self.yaw_sampler = UniformDistribution(
          degrees[0][0], degrees[0][1], validate_args=False
      )
      self.pitch_sampler = UniformDistribution(
          degrees[1][0], degrees[1][1], validate_args=False
      )
      self.roll_sampler = UniformDistribution(
          degrees[2][0], degrees[2][1], validate_args=False
      )
  
      self.uniform_sampler = UniformDistribution(
          torch.tensor(0, device=device, dtype=dtype),
          torch.tensor(1, device=device, dtype=dtype),
          validate_args=False,
      )
  
file_path: kornia/kornia/augmentation/random_generator/_3d/affine.py
imports: from typing import Dict, Optional, Tuple, Union
  import torch
  from kornia.augmentation.random_generator.base import RandomGeneratorBase, UniformDistribution
  from kornia.augmentation.utils import _adapted_rsampling, _singular_range_check, _tuple_range_reader
  from kornia.utils.helpers import _extract_device_dtype
label_desc: Use image node_id 3 for calling the AffineGenerator3D obj's underlying member method code with example usage: obj.make_samplers(device, dtype) without return types