code: def test_SizedDict_size():
      d = SizedDict()
      assert d.size == 0
  
      x = np.random.randn(10)
      d["a"] = x
      assert d.size == get_size(x) + sys.getsizeof("a")
  
      y = np.random.randn(10)
      d["b"] = y
      assert d.size == get_size(x) + get_size(y) + sys.getsizeof(
          "a"
      ) + sys.getsizeof("b")
  
      # Overwrite
      z = np.random.randn(10)
      d["b"] = z
      assert d.size == get_size(x) + get_size(z) + sys.getsizeof(
          "a"
      ) + sys.getsizeof("b")
  
file_path: espnet/test/espnet2/utils/test_sized_dict.py
imports: import multiprocessing
  import sys
  import numpy
  import pytest
  import torch.multiprocessing
  from espnet2.utils.sized_dict import SizedDict, get_size
label_desc: Use image node_id 2 for calling a global function with example usage: test_SizedDict_size() without return types