code: def testRegister(self):
      def extent_fn(dtype):
          return dtype.extent
  
      try:
          MPI.Register_datarep(
              "mpi4py-datarep-dummy",
              read_fn=None,
              write_fn=None,
              extent_fn=extent_fn,
          )
      except NotImplementedError:
          self.skipTest("mpi-register-datrep")
      with self.assertRaises(MPI.Exception) as cm:
          MPI.Register_datarep(
              "mpi4py-datarep-dummy",
              read_fn=None,
              write_fn=None,
              extent_fn=extent_fn,
          )
      ierr = cm.exception.Get_error_class()
      self.assertEqual(ierr, MPI.ERR_DUP_DATAREP)
  
imports: from mpi4py import MPI
  import mpiunittest
  import arrayimpl
  import os, tempfile
  import platform
label_desc: Use image node_id 1 for calling the TestDatarep obj's underlying member method code with example usage: obj.testRegister() and returns: dtype