code: def _adapted_uniform(
      shape: Union[Tuple[int, ...], torch.Size],
      low: Union[float, Tensor],
      high: Union[float, Tensor],
      same_on_batch: bool = False,
  ) -> Tensor:
      r"""The uniform sampling function that accepts 'same_on_batch'.
  
      If same_on_batch is True, all values generated will be exactly same given a batch_size (shape[0]). By default,
      same_on_batch is set to False.
  
      By default, sampling happens on the default device and dtype. If low/high is a tensor, sampling will happen in the
      same device/dtype as low/high tensor.
      """
      device, dtype = _extract_device_dtype(
          [
              low if isinstance(low, Tensor) else None,
              high if isinstance(high, Tensor) else None,
          ]
      )
      low = as_tensor(low, device=device, dtype=dtype)
      high = as_tensor(high, device=device, dtype=dtype)
      # validate_args=False to fix pytorch 1.7.1 error:
      #     ValueError: Uniform is not defined when low>= high.
      dist = Uniform(low, high, validate_args=False)
      return _adapted_rsampling(shape, dist, same_on_batch)
  
imports: from functools import wraps
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torch
  from torch.distributions import Beta, Uniform
  from kornia.core import Tensor, as_tensor
  from kornia.geometry.boxes import Boxes
  from kornia.geometry.keypoints import Keypoints
  from kornia.utils import _extract_device_dtype
label_desc: Use image node_id 13 for calling a global function with example usage: _adapted_uniform(shape, low, high, same_on_batch) and returns: _adapted_rsampling