code: def test_duplicate_registrations(self):
      dispatcher = PythonDispatcher()
  
      with self.assertRaisesRegex(
          RuntimeError, r"Overriden is not allowed"
      ):
          dispatcher.register(["CPU", "CPU"])
  
imports: import torch._C
  from torch.testing._internal.common_utils import TestCase, run_tests
  from torch._python_dispatcher import PythonDispatcher
  from collections import namedtuple
  import itertools
  import os
  import re
  import torch.utils.cpp_extension
label_desc: Use image node_id 5 for calling the TestPythonDispatcher obj's underlying member method code with example usage: obj.test_duplicate_registrations() without return types