code: def test_dints_search(
      self, dints_grid_params, dints_params, input_shape, expected_shape
  ):
      num_blocks = dints_grid_params["num_blocks"]
      num_depths = dints_grid_params["num_depths"]
      # init a Cell to obtain cell operation number
      _cell = Cell(
          1, 1, 0, spatial_dims=dints_grid_params["spatial_dims"]
      )
      num_cell_ops = len(_cell.OPS)
      # define archtecture codes
      node_a = torch.ones((num_blocks + 1, num_depths))
      arch_code_a = np.ones((num_blocks, 3 * num_depths - 2))
      arch_code_c = np.random.randint(
          num_cell_ops, size=(num_blocks, 3 * num_depths - 2)
      )
      # initialize with codes
      dints_grid_params["arch_code"] = [arch_code_a, arch_code_c]
      grid = TopologyInstance(**dints_grid_params)
      # set as deploy stage
      dints_params["dints_space"] = grid
      dints_params["node_a"] = node_a
      net = DiNTS(**dints_params).to(dints_grid_params["device"])
      result = net(
          torch.randn(input_shape).to(dints_grid_params["device"])
      )
      self.assertEqual(result.shape, expected_shape)
      self.assertTrue(isinstance(net.weight_parameters(), list))
  
file_path: MONAI/tests/test_dints_network.py
imports: from __future__ import annotations
  import unittest
  import numpy
  import torch
  from parameterized import parameterized
  from monai.networks.nets import DiNTS, TopologyInstance, TopologySearch
  from monai.networks.nets.dints import Cell
  from tests.utils import SkipIfBeforePyTorchVersion, skip_if_quick, test_script_save
label_desc: Use image node_id 2 for calling the TestDints obj's underlying member method code with example usage: obj.test_dints_search(dints_grid_params, dints_params, input_shape, expected_shape) without return types