code: def test_rand_limits(dtype, device):
      @triton.jit
      def kernel(input, output, n: tl.constexpr):
          idx = tl.arange(0, n)
          x = tl.load(input + idx)
          y = tl.random.uint_to_uniform_float(x)
          tl.store(output + idx, y)
  
      torch_dtype = getattr(torch, dtype)
      min_max_int = torch.tensor(
          [
              torch.iinfo(torch_dtype).min,
              torch.iinfo(torch_dtype).max,
          ],
          dtype=torch_dtype,
          device=device,
      )
      output = torch.empty(2, dtype=torch.float32, device=device)
      kernel[(1,)](min_max_int, output, 2)
  
      assert output[0] == output[1]
      assert (
          1.0 - torch.finfo(torch.float32).eps <= output[0].item() < 1.0
      )
  
imports: import numpy
  import pytest
  import scipy.stats
  import torch
  import triton
  import triton.language
label_desc: Use image node_id 4 for calling a global function with example usage: test_rand_limits(dtype, device) without return types