code: def test_load_state_different_resolution(self):
      # check that we can load the state of one ray sampler into
      # another with different image size.
      module1 = NDCGridRaysampler(
          image_width=20,
          image_height=30,
          n_pts_per_ray=40,
          min_depth=1.2,
          max_depth=2.3,
      )
      module2 = NDCGridRaysampler(
          image_width=22,
          image_height=32,
          n_pts_per_ray=42,
          min_depth=1.2,
          max_depth=2.3,
      )
      state = module1.state_dict()
      module2.load_state_dict(state)
  
imports: import unittest
  from typing import Callable
  import torch
  from pytorch3d.common.compat import meshgrid_ij
  from pytorch3d.ops import eyes
  from pytorch3d.renderer import MonteCarloRaysampler, MultinomialRaysampler, NDCGridRaysampler, NDCMultinomialRaysampler
  from pytorch3d.renderer.cameras import FoVOrthographicCameras, FoVPerspectiveCameras, OrthographicCameras, PerspectiveCameras
  from pytorch3d.renderer.implicit.raysampling import _jiggle_within_stratas, _safe_multinomial
  from pytorch3d.renderer.implicit.utils import ray_bundle_to_ray_points, ray_bundle_variables_to_ray_points
  from pytorch3d.transforms import Rotate
  from .common_testing import TestCaseMixin
  from .test_cameras import init_random_cameras
label_desc: Use image node_id 9 for calling the TestRaysampling obj's underlying member method code with example usage: obj.test_load_state_different_resolution() without return types