code: def get_range_val(value, rnd_type="uniform"):
      if isinstance(value, (list, tuple, np.ndarray)):
          if len(value) == 2:
              if value[0] == value[1]:
                  n_val = value[0]
              else:
                  orig_type = type(value[0])
                  if rnd_type == "uniform":
                      n_val = random.uniform(value[0], value[1])
                  elif rnd_type == "normal":
                      n_val = random.normalvariate(value[0], value[1])
                  n_val = orig_type(n_val)
          elif len(value) == 1:
              n_val = value[0]
          else:
              raise RuntimeError(
                  "value must be either a single value or a list/tuple of len 2"
              )
          return n_val
      else:
          return value
  
imports: import random
  import numpy
  import paddle
  from paddle.nn.functional import avg_pool2d, avg_pool3d
  from typing import List, Tuple, Union, Callable
  from copy import deepcopy
  from scipy.ndimage import map_coordinates, fourier_gaussian
  from scipy.ndimage.filters import gaussian_filter, gaussian_gradient_magnitude
  from scipy.ndimage.morphology import grey_dilation
  from skimage.transform import resize
  from scipy.ndimage.measurements import label
label_desc: Use image node_id 12 for calling a global function with example usage: get_range_val(value, rnd_type) and returns: n_val, value