code: def testFromBufferArrayRW(self):
      buffer = MPI.buffer
      obj = array.array("B", [1, 2, 3])
      buf = buffer.frombuffer(obj, readonly=False)
      self.assertNotEqual(buf.address, 0)
      self.assertEqual(buf.nbytes, 3)
      self.assertFalse(buf.readonly)
      self.assertEqual(len(buf), 3)
      m = memoryview(buf)
      self.assertEqual(m.format, "B")
      self.assertEqual(m.itemsize, 1)
      self.assertEqual(m.ndim, 1)
      self.assertFalse(m.readonly)
      self.assertEqual(m.shape, (3,))
      self.assertEqual(m.strides, (1,))
      self.assertEqual(m.tobytes(), b"\1\2\3")
      self.assertEqual(m.tolist(), [1, 2, 3])
      buf[:] = 1
      self.assertEqual(obj, array.array("B", [1] * 3))
      buf[1:] = array.array("B", [7] * 2)
      self.assertEqual(obj, array.array("B", [1, 7, 7]))
      buf[1:2] = array.array("B", [8] * 1)
      self.assertEqual(obj, array.array("B", [1, 8, 7]))
      buf.release()
      self.assertEqual(buf.address, 0)
      self.assertEqual(buf.nbytes, 0)
      self.assertFalse(buf.readonly)
  
file_path: mpi4py/test/test_buffer.py
imports: from mpi4py import MPI
  import mpiunittest
label_desc: Use image node_id 10 for calling the TestBuffer obj's underlying member method code with example usage: obj.testFromBufferArrayRW() without return types