code: def test_sample_working(self):
      initial = Sample()
      initial.x = 1
      initial["y"] = 2
      # Assert setter and getter
      self.assertEqual(initial.x, 1)
      self.assertEqual(initial["x"], 1)
      self.assertEqual(initial.y, 2)
      self.assertEqual(initial["y"], 2)
  
      update_dict = {"a": 3, "b": {"c": 4}}
  
      initial.update(update_dict)
      self.assertEqual(initial.a, 3)
      self.assertEqual(initial["a"], 3)
      self.assertEqual(initial.b.c, 4)
      self.assertEqual(initial["b"].c, 4)
  
file_path: mmf/tests/common/test_sample.py
imports: import unittest
  import tests.test_utils
  import torch
  from mmf.common.sample import convert_batch_to_sample_list, Sample, SampleList, to_device
label_desc: Use image node_id 1 for calling the TestSample obj's underlying member method code with example usage: obj.test_sample_working() without return types