code: def test_remove_duplicate_names(self):
      A = torch.zeros((3, 3))
      B = A[:1, :]
  
      self.assertEqual(
          _remove_duplicate_names({"A": A, "B": B}), {"A": ["B"]}
      )
      self.assertEqual(
          _remove_duplicate_names({"A": A, "B": B, "C": A}),
          {"A": ["B", "C"]},
      )
      with self.assertRaises(RuntimeError):
          self.assertEqual(_remove_duplicate_names({"B": B}), [])
  
imports: import copy
  import unittest
  import torch
  from safetensors import safe_open
  from safetensors.torch import _end_ptr, _find_shared_tensors, _is_complete, _remove_duplicate_names, load_model, save_file, save_model
label_desc: Use image node_id 5 for calling the TorchModelTestCase obj's underlying member method code with example usage: obj.test_remove_duplicate_names() without return types