code: def test_get_tensor_sizes() -> None:
      in_width = 224
      in_height = 224
      in_channels = 3
      in_batch_size = 1
      img = torch.randn(
          size=(in_batch_size, in_channels, in_height, in_width)
      )
  
      # test for Tensor
      size_info = get_tensor_sizes(img)
      assert size_info == [
          in_batch_size,
          in_channels,
          in_height,
          in_width,
      ]
  
      # test for empty dict
      data_dict = {}
      size_info = get_tensor_sizes(data_dict)
      assert size_info == []
  
      # test for dict with single key
      data_dict = {"image": img}
      size_info = get_tensor_sizes(data_dict)
      assert size_info == [
          str(
              f"image: [{in_batch_size}, {in_channels}, {in_height}, {in_width}]"
          )
      ]
  
      # test for dict with two keys
      data_dict = {"image_1": img, "image_2": img}
      size_info = get_tensor_sizes(data_dict)
      assert size_info == [
          str(
              f"image_1: [{in_batch_size}, {in_channels}, {in_height}, {in_width}]"
          ),
          str(
              f"image_2: [{in_batch_size}, {in_channels}, {in_height}, {in_width}]"
          ),
      ]
  
      # test for nested dict
      data_dict = {"image_1": img, "image_2": {"image": img}}
      size_info = get_tensor_sizes(data_dict)
      assert size_info == [
          str(
              f"image_1: [{in_batch_size}, {in_channels}, {in_height}, {in_width}]"
          ),
          str(
              f"image_2: ['image: [{in_batch_size}, {in_channels}, {in_height}, {in_width}]']"
          ),
      ]
  
      # test for nested dict with non-tensor
      data_dict = {"image": img, "random_key": "data"}
      size_info = get_tensor_sizes(data_dict)
      assert size_info == [
          str(
              f"image: [{in_batch_size}, {in_channels}, {in_height}, {in_width}]"
          )
      ]
  
imports: import argparse
  from collections import OrderedDict
  import torch
  import torch.nn
  from cvnets.misc.common import freeze_modules_based_on_opts, get_tensor_sizes
label_desc: Use image node_id 2 for calling a global function with example usage: test_get_tensor_sizes() without return types