code: def check_contents(self, factory, newtype, oldtype):
      try:
          envelope = newtype.Get_envelope()
          contents = newtype.Get_contents()
      except NotImplementedError:
          self.skipTest("mpi-type-get_envelope")
      ni, na, nc, nd, combiner = envelope
      i, a, c, d = contents
      self.assertEqual(ni, len(i))
      self.assertEqual(na, len(a))
      self.assertEqual(nc, len(c))
      self.assertEqual(nd, len(d))
      self.assertNotEqual(combiner, MPI.COMBINER_NAMED)
      self.assertEqual(newtype.envelope, envelope)
      self.assertEqual(newtype.combiner, combiner)
      self.assertFalse(newtype.is_named)
      if combiner in (
          MPI.COMBINER_F90_INTEGER,
          MPI.COMBINER_F90_REAL,
          MPI.COMBINER_F90_COMPLEX,
      ):
          self.assertTrue(newtype.is_predefined)
      else:
          self.assertFalse(newtype.is_predefined)
      for dt in d:
          self.free(dt)
      contents = newtype.contents
      self.assertEqual(contents[:-1], (i, a, c))
      for dt in contents[-1]:
          self.free(dt)
  
imports: from mpi4py import MPI
  import mpiunittest
  import struct
label_desc: Use image node_id 2 for calling the BaseTestDatatypeCreateMixin obj's underlying member method code with example usage: obj.check_contents(factory, newtype, oldtype) without return types