docstr: Test behavior with a nested input
docstr_tok: ["Test","behavior","with","a","nested","input"]
code: def test_get_tensor_size_bytes_map_with_nested_input(self) -> None:
      """Test behavior with a nested input"""
  
      inputs = {
          "x": torch.rand(1, 2, 3),
          "y": {"z": torch.rand(4, 5, 6), "t": torch.rand(7, 8, 9)},
      }
      tensor_map = get_tensor_size_bytes_map(inputs)
      self.assertEqual(len(tensor_map), 3)
      self.assertTrue(inputs["x"] in tensor_map)
      input_x = cast(torch.Tensor, inputs["x"])
      tensor_map_x = cast(torch.Tensor, tensor_map[input_x])
      self.assertEqual(
          tensor_map_x,
          input_x.size().numel() * input_x.element_size(),
      )
      # pyre-fixme[6]: For 1st argument expected `Union[None, List[typing.Any],
      #  int, slice, Tensor, typing.Tuple[typing.Any, ...]]` but got `str`.
      self.assertTrue(inputs["y"]["z"] in tensor_map)
      self.assertEqual(
          # pyre-fixme[6]: For 1st argument expected `Union[None,
          #  List[typing.Any], int, slice, Tensor, typing.Tuple[typing.Any, ...]]`
          #  but got `str`.
          tensor_map[inputs["y"]["z"]],
          # pyre-fixme[6]: For 1st argument expected `Union[None,
          #  List[typing.Any], int, slice, Tensor, typing.Tuple[typing.Any, ...]]`
          #  but got `str`.
          inputs["y"]["z"].size().numel()
          * inputs["y"]["z"].element_size(),
      )
      # pyre-fixme[6]: For 1st argument expected `Union[None, List[typing.Any],
      #  int, slice, Tensor, typing.Tuple[typing.Any, ...]]` but got `str`.
      self.assertTrue(inputs["y"]["t"] in tensor_map)
      self.assertEqual(
          # pyre-fixme[6]: For 1st argument expected `Union[None,
          #  List[typing.Any], int, slice, Tensor, typing.Tuple[typing.Any, ...]]`
          #  but got `str`.
          tensor_map[inputs["y"]["t"]],
          # pyre-fixme[6]: For 1st argument expected `Union[None,
          #  List[typing.Any], int, slice, Tensor, typing.Tuple[typing.Any, ...]]`
          #  but got `str`.
          inputs["y"]["t"].size().numel()
          * inputs["y"]["t"].element_size(),
      )
  
imports: import time
  import unittest
  from collections import deque, namedtuple
  from dataclasses import dataclass
  from typing import cast, Deque, List
  import torch
  from torchtnt.utils.memory import get_tensor_size_bytes_map, measure_rss_deltas, RSSProfiler
label_desc: Use image node_id 7 for calling the MemoryTest obj's underlying member method code with example usage: obj.test_get_tensor_size_bytes_map_with_nested_input() without return types