code: def test_dints_inference(
      self, dints_grid_params, dints_params, input_shape, expected_shape
  ):
      grid = TopologySearch(**dints_grid_params)
      dints_params["dints_space"] = grid
      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)
      # test functions
      grid.get_ram_cost_usage(in_size=input_shape, full=True)
      grid.get_ram_cost_usage(in_size=input_shape, full=False)
      probs_a, _ = grid.get_prob_a(child=True)
      grid.get_topology_entropy(probs_a)
      grid.decode()
      grid.gen_mtx(depth=4)
  
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 1 for calling the TestDints obj's underlying member method code with example usage: obj.test_dints_inference(dints_grid_params, dints_params, input_shape, expected_shape) without return types