code: def test_dimensions_random_sampler(self, device, dtype):
      heights, widths, num_img_rays = create_camera_dimensions(
          device, dtype
      )
      sampler = RandomRaySampler(
          1, 1, ndc=False, device=device, dtype=dtype
      )
      points_2d_camera = sampler.sample_points_2d(
          heights, widths, num_img_rays
      )
      assert len(points_2d_camera) == 2
      assert points_2d_camera[10].points_2d.shape == (3, 10, 2)
      assert points_2d_camera[15].points_2d.shape == (2, 15, 2)
  
imports: import math
  import torch
  from kornia.core import Device
  from kornia.geometry.camera import PinholeCamera
  from kornia.nerf.samplers import RandomGridRaySampler, RandomRaySampler, UniformRaySampler, calc_ray_t_vals, cameras_for_ids, sample_lengths, sample_ray_points
  from kornia.testing import assert_close
label_desc: Use image node_id 1 for calling the TestRaySampler_2DPoints obj's underlying member method code with example usage: obj.test_dimensions_random_sampler(device, dtype) without return types