code: def testSendRecv(self):
      size = self.COMM.Get_size()
      rank = self.COMM.Get_rank()
      for array, typecode in arrayimpl.loop():
          with arrayimpl.test(self):
              if unittest.is_mpi_gpu("openmpi", array):
                  continue
              if unittest.is_mpi_gpu("mvapich2", array):
                  continue
              for s in range(0, size + 1):
                  with self.subTest(s=s):
                      #
                      sbuf = array(s, typecode, s)
                      rbuf = array(-1, typecode, s)
                      mem = array(
                          0, typecode, 2 * (s + MPI.BSEND_OVERHEAD)
                      ).as_raw()
                      if size == 1:
                          MPI.Attach_buffer(mem)
                          rbuf = sbuf
                          MPI.Detach_buffer()
                      elif rank == 0:
                          MPI.Attach_buffer(mem)
                          self.COMM.Ibsend(sbuf.as_mpi(), 1, 0).Wait()
                          self.COMM.Bsend(sbuf.as_mpi(), 1, 0)
                          MPI.Detach_buffer()
                          self.COMM.Send(sbuf.as_mpi(), 1, 0)
                          self.COMM.Ssend(sbuf.as_mpi(), 1, 0)
                          self.COMM.Recv(rbuf.as_mpi(), 1, 0)
                          self.COMM.Recv(rbuf.as_mpi(), 1, 0)
                          self.COMM.Recv(rbuf.as_mpi(), 1, 0)
                          self.COMM.Recv(rbuf.as_mpi(), 1, 0)
                      elif rank == 1:
                          self.COMM.Recv(rbuf.as_mpi(), 0, 0)
                          self.COMM.Recv(rbuf.as_mpi(), 0, 0)
                          self.COMM.Recv(rbuf.as_mpi(), 0, 0)
                          self.COMM.Recv(rbuf.as_mpi(), 0, 0)
                          MPI.Attach_buffer(mem)
                          self.COMM.Ibsend(sbuf.as_mpi(), 0, 0).Wait()
                          self.COMM.Bsend(sbuf.as_mpi(), 0, 0)
                          MPI.Detach_buffer()
                          self.COMM.Send(sbuf.as_mpi(), 0, 0)
                          self.COMM.Ssend(sbuf.as_mpi(), 0, 0)
                      else:
                          rbuf = sbuf
                      check = arrayimpl.scalar(s)
                      for value in rbuf:
                          self.assertEqual(value, check)
                      #
                      rank = self.COMM.Get_rank()
                      sbuf = array(s, typecode, s)
                      rbuf = array(-1, typecode, s)
                      rreq = self.COMM.Irecv(rbuf.as_mpi(), rank, 0)
                      self.COMM.Rsend(sbuf.as_mpi(), rank, 0)
                      rreq.Wait()
                      for value in rbuf:
                          self.assertEqual(value, check)
                      rbuf = array(-1, typecode, s)
                      rreq = self.COMM.Irecv(rbuf.as_mpi(), rank, 0)
                      self.COMM.Irsend(sbuf.as_mpi(), rank, 0).Wait()
                      rreq.Wait()
                      for value in rbuf:
                          self.assertEqual(value, check)
  
imports: from mpi4py import MPI
  import mpiunittest
  import itertools
  import arrayimpl
label_desc: Use image node_id 5 for calling the BaseTestP2PBuf obj's underlying member method code with example usage: obj.testSendRecv() without return types