docstr: Test behavior with a named tuple input
docstr_tok: ["Test","behavior","with","a","named","tuple","input"]
code: def test_get_tensor_size_bytes_map_with_named_tuple_input(
      self,
  ) -> None:
      """Test behavior with a named tuple input"""
  
      Object = namedtuple("Object", ["x", "y"])
      inputs = Object(x=torch.rand(1, 2, 3), y=torch.rand(4, 5, 6))
      tensor_map = get_tensor_size_bytes_map(inputs)
      self.assertEqual(len(tensor_map), 2)
      self.assertTrue(inputs.x in tensor_map)
      self.assertEqual(
          tensor_map[inputs.x],
          inputs.x.size().numel() * inputs.x.element_size(),
      )
      self.assertTrue(inputs.y in tensor_map)
      self.assertEqual(
          tensor_map[inputs.y],
          inputs.y.size().numel() * inputs.y.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 2 for calling the MemoryTest obj's underlying member method code with example usage: obj.test_get_tensor_size_bytes_map_with_named_tuple_input() without return types